From f551548372efa9a22a34e4f1b74fa794d304e6f5 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 13 Jul 2016 19:41:55 +0200 Subject: btrfs-progs: do not set optind if not necessary In the subcommand callbacks that are called just once, we don't need to explicitly reset optind. Signed-off-by: David Sterba --- cmds-filesystem.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmds-filesystem.c') diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 9392a30b..ef1f550b 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -1041,7 +1041,6 @@ static int cmd_filesystem_defrag(int argc, char **argv) defrag_global_verbose = 0; defrag_global_errors = 0; defrag_global_fancy_ioctl = 0; - optind = 1; while(1) { int c = getopt(argc, argv, "vrc::fs:l:t:"); if (c < 0) -- cgit v1.2.3