summaryrefslogtreecommitdiff
path: root/btrfs-map-logical.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 /btrfs-map-logical.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 'btrfs-map-logical.c')
-rw-r--r--btrfs-map-logical.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index fc8ce46f..5d14035e 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -124,7 +124,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' },
@@ -134,8 +133,7 @@ int main(int ac, char **av)
{ NULL, 0, NULL, 0}
};
- c = getopt_long(ac, av, "l:c:o:b:", long_options,
- &option_index);
+ c = getopt_long(ac, av, "l:c:o:b:", long_options, NULL);
if (c < 0)
break;
switch(c) {