From 94e0fbe794455d3e61ffcb5b2a34918ddd12949b Mon Sep 17 00:00:00 2001 From: kaa Date: Fri, 30 Jun 2023 10:24:14 -0700 Subject: =?UTF-8?q?Compare=20strstr=E2=80=99s=20return=20value=20against?= =?UTF-8?q?=20NULL=20instead=20of=200.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- neols.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'neols.c') diff --git a/neols.c b/neols.c index 06dc66e..a288fee 100644 --- a/neols.c +++ b/neols.c @@ -128,10 +128,10 @@ main(int argc, char **argv) path = line; stripquote(path + strlen("path") + PREFIX); } else if (line[8] == 's') { - if (strstr(line, "false") == 0) - is_directory = 1; - else + if (strstr(line, "false") != NULL) is_directory = 0; + else + is_directory = 1; free(line); } else if (line[8] == 'i') { line[len - 1] = '\0'; -- cgit v1.2.3