[hackers] [dmenu][PATCH] remove always true condition in if statement

From: Guilherme Janczak <guilherme.janczak_AT_yandex.com>
Date: Sun, 25 Jul 2021 01:55:25 +0000

---
 stest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stest.c b/stest.c
index 7a7b0bc..e27d3a5 100644
--- a/stest.c
+++ b/stest.c
_AT_@ -84,7 +84,7 @@ main(int argc, char *argv[])
 	if (!argc) {
 		/* read list from stdin */
 		while ((n = getline(&line, &linesiz, stdin)) > 0) {
-			if (n && line[n - 1] == '\n')
+			if (line[n - 1] == '\n')
 				line[n - 1] = '\0';
 			test(line, line);
 		}
--
2.31.1
Received on Sun Jul 25 2021 - 03:55:25 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 25 2021 - 05:00:34 CEST