summaryrefslogtreecommitdiff
path: root/btrfs-corrupt-block.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-03-01 16:29:16 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commit358807cc33fb3ed50ddf782e5b32f6e3cc2fa329 (patch)
tree51956616bec899d08dd7d9ca46ed9bf9b6682f55 /btrfs-corrupt-block.c
parent6398ed78f9d52769954ba5fe3c15452c390397a7 (diff)
btrfs-progs: unify argc min/max checking
We don't want to modify argc. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-corrupt-block.c')
-rw-r--r--btrfs-corrupt-block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index 18853d3c..98492324 100644
--- a/btrfs-corrupt-block.c
+++ b/btrfs-corrupt-block.c
@@ -1142,8 +1142,7 @@ int main(int argc, char **argv)
}
}
set_argv0(argv);
- argc = argc - optind;
- if (check_argc_min(argc, 1))
+ if (check_argc_min(argc - optind, 1))
print_usage(1);
dev = argv[optind];