From 4074ae5f2bac71889527e817ddeee5fd85a3ba59 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 8 Apr 2015 17:33:55 +0200 Subject: 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 --- btrfs-convert.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'btrfs-convert.c') diff --git a/btrfs-convert.c b/btrfs-convert.c index c7ff8280..f9dd7346 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -2838,7 +2838,6 @@ int main(int argc, char *argv[]) char *fslabel = NULL; while(1) { - int long_index; enum { GETOPT_VAL_NO_PROGRESS = 256 }; static const struct option long_options[] = { { "no-progress", no_argument, NULL, @@ -2853,8 +2852,7 @@ int main(int argc, char *argv[]) { "nodesize", required_argument, NULL, 'N' }, { NULL, 0, NULL, 0 } }; - int c = getopt_long(argc, argv, "dinN:rl:Lp", long_options, - &long_index); + int c = getopt_long(argc, argv, "dinN:rl:Lp", long_options, NULL); if (c < 0) break; -- cgit v1.2.3