]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fsck: fix compiler warning [-Wlogical-not-parentheses]
authorKarel Zak <kzak@redhat.com>
Mon, 16 Feb 2015 10:02:53 +0000 (11:02 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Feb 2015 10:02:53 +0000 (11:02 +0100)
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fsck.c

index 78ad43e2d1ac19d5e350a8056ae55944a2a1455b..5842da4085b260a2d309f1064aa583d1866f11b2 100644 (file)
@@ -1464,14 +1464,13 @@ static void parse_argv(int argc, char *argv[])
                                break;
                        case 'C':
                                progress = 1;
-                               if (arg[j+1]) {
+                               if (arg[j+1]) {                                 /* -C<fd> */
                                        progress_fd = string_to_int(arg+j+1);
                                        if (progress_fd < 0)
                                                progress_fd = 0;
                                        else
                                                goto next_arg;
-                               } else if ((i+1) < argc &&
-                                          !strncmp(argv[i+1], "-", 1) == 0) {
+                               } else if (i+1 < argc && *argv[i+1] != '-') {   /* -C <fd> */
                                        progress_fd = string_to_int(argv[i]);
                                        if (progress_fd < 0)
                                                progress_fd = 0;