diff options
author | David Sterba <dsterba@suse.cz> | 2015-04-08 17:33:55 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-04-08 17:33:55 +0200 |
commit | 4074ae5f2bac71889527e817ddeee5fd85a3ba59 (patch) | |
tree | 18c6b62da30f57218777a5003356edf51a39fffb /cmds-check.c | |
parent | 39b3d7c77a551b7c6b2063789797fceeae22b346 (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-check.c')
-rw-r--r-- | cmds-check.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmds-check.c b/cmds-check.c index ed8c6984..d5cb94f9 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -9221,7 +9221,6 @@ int cmd_check(int argc, char **argv) while(1) { int c; - int option_index = 0; enum { OPT_REPAIR = 257, OPT_INIT_CSUM, OPT_INIT_EXTENT, OPT_CHECK_CSUM, OPT_READONLY }; static const struct option long_options[] = { @@ -9238,8 +9237,7 @@ int cmd_check(int argc, char **argv) { NULL, 0, NULL, 0} }; - c = getopt_long(argc, argv, "as:br:", long_options, - &option_index); + c = getopt_long(argc, argv, "as:br:", long_options, NULL); if (c < 0) break; switch(c) { |