aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-find-root.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-find-root.c
parent6398ed78f9d52769954ba5fe3c15452c390397a7 (diff)
downloadbtrfs-progs-358807cc33fb3ed50ddf782e5b32f6e3cc2fa329.tar.gz
btrfs-progs-358807cc33fb3ed50ddf782e5b32f6e3cc2fa329.tar.xz
btrfs-progs-358807cc33fb3ed50ddf782e5b32f6e3cc2fa329.zip
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-find-root.c')
-rw-r--r--btrfs-find-root.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/btrfs-find-root.c b/btrfs-find-root.c
index 2d5bbb2..e6ccc53 100644
--- a/btrfs-find-root.c
+++ b/btrfs-find-root.c
@@ -185,8 +185,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)) {
usage();
exit(1);
}