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-qgroup.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-qgroup.c')
-rw-r--r-- | cmds-qgroup.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 2d6d84b8..b1c7e181 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -251,7 +251,6 @@ static int cmd_qgroup_show(int argc, char **argv) optind = 1; while (1) { int c; - int option_index = 0; static const struct option long_options[] = { {"sort", 1, NULL, 'S'}, {"raw", no_argument, NULL, GETOPT_VAL_RAW}, @@ -265,9 +264,8 @@ static int cmd_qgroup_show(int argc, char **argv) GETOPT_VAL_HUMAN_READABLE}, { NULL, 0, NULL, 0 } }; - c = getopt_long(argc, argv, "pcreFf", - long_options, &option_index); + c = getopt_long(argc, argv, "pcreFf", long_options, NULL); if (c < 0) break; switch (c) { |