summaryrefslogtreecommitdiff
path: root/cmds-inspect.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-07-13 19:41:55 +0200
committerDavid Sterba <dsterba@suse.com>2016-07-13 19:41:55 +0200
commitf551548372efa9a22a34e4f1b74fa794d304e6f5 (patch)
tree7c31ab7f1819e84ac62dc17bb3b00d6cea5a463c /cmds-inspect.c
parent83dc05b013ce08d68a4a3cdcf17e6c5506a8383e (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-inspect.c')
-rw-r--r--cmds-inspect.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/cmds-inspect.c b/cmds-inspect.c
index 2ae44be2..4b7cea07 100644
--- a/cmds-inspect.c
+++ b/cmds-inspect.c
@@ -96,7 +96,6 @@ static int cmd_inspect_inode_resolve(int argc, char **argv)
int ret;
DIR *dirstream = NULL;
- optind = 1;
while (1) {
int c = getopt(argc, argv, "v");
if (c < 0)
@@ -151,7 +150,6 @@ static int cmd_inspect_logical_resolve(int argc, char **argv)
char *path_ptr;
DIR *dirstream = NULL;
- optind = 1;
while (1) {
int c = getopt(argc, argv, "Pvs:");
if (c < 0)