From 85ede33a2291f7aa7a7bf1cccb6f6ff6da1c046b Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 7 Jun 2020 22:15:52 -0700 Subject: Improve code readability by using explicit != 0 compare when using strncmp [clang-tidy] Found with bugprone-suspicious-string-compare Signed-off-by: Rosen Penev --- tools/plistutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/plistutil.c b/tools/plistutil.c index bbce7c7..989db35 100644 --- a/tools/plistutil.c +++ b/tools/plistutil.c @@ -274,7 +274,7 @@ int main(int argc, char *argv[]) if (plist_out) { - if (options->out_file != NULL && strcmp(options->out_file, "-")) + if (options->out_file != NULL && strcmp(options->out_file, "-") != 0) { FILE *oplist = fopen(options->out_file, "wb"); if (!oplist) { -- cgit v1.1-32-gdbae