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 /btrfs-corrupt-block.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 'btrfs-corrupt-block.c')
-rw-r--r-- | btrfs-corrupt-block.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c index f332bdf7..56b553d2 100644 --- a/btrfs-corrupt-block.c +++ b/btrfs-corrupt-block.c @@ -1017,7 +1017,6 @@ int main(int ac, char **av) while(1) { int c; - int option_index = 0; static const struct option long_options[] = { /* { "byte-count", 1, NULL, 'b' }, */ { "logical", 1, NULL, 'l' }, @@ -1041,7 +1040,7 @@ int main(int ac, char **av) }; c = getopt_long(ac, av, "l:c:b:eEkuUi:f:x:m:K:IDdr:", - long_options, &option_index); + long_options, NULL); if (c < 0) break; switch(c) { |