diff options
author | David Sterba <dsterba@suse.com> | 2016-07-13 19:41:55 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-13 19:41:55 +0200 |
commit | f551548372efa9a22a34e4f1b74fa794d304e6f5 (patch) | |
tree | 7c31ab7f1819e84ac62dc17bb3b00d6cea5a463c /cmds-balance.c | |
parent | 83dc05b013ce08d68a4a3cdcf17e6c5506a8383e (diff) |
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 <dsterba@suse.com>
Diffstat (limited to 'cmds-balance.c')
-rw-r--r-- | cmds-balance.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/cmds-balance.c b/cmds-balance.c index 71816736..374e9817 100644 --- a/cmds-balance.c +++ b/cmds-balance.c @@ -522,7 +522,6 @@ static int cmd_balance_start(int argc, char **argv) memset(&args, 0, sizeof(args)); - optind = 1; while (1) { enum { GETOPT_VAL_FULL_BALANCE = 256 }; static const struct option longopts[] = { @@ -785,7 +784,6 @@ static int cmd_balance_status(int argc, char **argv) int verbose = 0; int ret; - optind = 1; while (1) { int opt; static const struct option longopts[] = { |