summaryrefslogtreecommitdiff
path: root/mkfs.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 /mkfs.c
parent39b3d7c77a551b7c6b2063789797fceeae22b346 (diff)
downloadbtrfs-progs-4074ae5f2bac71889527e817ddeee5fd85a3ba59.tar.gz
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 'mkfs.c')
-rw-r--r--mkfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mkfs.c b/mkfs.c
index 8eab0e5..e8ee071 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1142,7 +1142,6 @@ int main(int ac, char **av)
while(1) {
int c;
- int option_index = 0;
static const struct option long_options[] = {
{ "alloc-start", 1, NULL, 'A'},
{ "byte-count", 1, NULL, 'b' },
@@ -1163,7 +1162,7 @@ int main(int ac, char **av)
};
c = getopt_long(ac, av, "A:b:fl:n:s:m:d:L:O:r:U:VMK",
- long_options, &option_index);
+ long_options, NULL);
if (c < 0)
break;
switch(c) {