summaryrefslogtreecommitdiffstats
path: root/disk-utils/fsck.c
diff options
context:
space:
mode:
authorKarel Zak2015-02-16 11:02:53 +0100
committerKarel Zak2015-02-16 11:02:53 +0100
commit0b1bb2839935714e0ffe836de67c8ae9ffc43004 (patch)
tree91ed6a0941eb8acbfbbb3af9da95d154de8a6137 /disk-utils/fsck.c
parentscript.1: Improve documentation of non-interactive behavior (diff)
downloadkernel-qcow2-util-linux-0b1bb2839935714e0ffe836de67c8ae9ffc43004.tar.gz
kernel-qcow2-util-linux-0b1bb2839935714e0ffe836de67c8ae9ffc43004.tar.xz
kernel-qcow2-util-linux-0b1bb2839935714e0ffe836de67c8ae9ffc43004.zip
fsck: fix compiler warning [-Wlogical-not-parentheses]
Reported-by: Ruediger Meier <sweet_f_a@gmx.de> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fsck.c')
-rw-r--r--disk-utils/fsck.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index 78ad43e2d..5842da408 100644
--- a/disk-utils/fsck.c
+++ b/disk-utils/fsck.c
@@ -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;