summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-04-08 17:33:55 +0200
committerDavid Sterba <dsterba@suse.cz>2015-04-08 17:33:55 +0200
commit4074ae5f2bac71889527e817ddeee5fd85a3ba59 (patch)
tree18c6b62da30f57218777a5003356edf51a39fffb /cmds-restore.c
parent39b3d7c77a551b7c6b2063789797fceeae22b346 (diff)
btrfs-progs: cleanup option index argument from getopt_long
We're not using it anywhere. The best practice is to add enums with values > 255 for the long options, option index counting is error prone. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index d2caa6ac..21e58eba 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -1176,7 +1176,6 @@ int cmd_restore(int argc, char **argv)
while (1) {
int opt;
- int option_index = 0;
static const struct option long_options[] = {
{ "path-regex", 1, NULL, 256},
{ "dry-run", 0, NULL, 'D'},
@@ -1184,7 +1183,7 @@ int cmd_restore(int argc, char **argv)
};
opt = getopt_long(argc, argv, "sxviot:u:df:r:lDc", long_options,
- &option_index);
+ NULL);
if (opt < 0)
break;