summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;