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-convert.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-convert.c')
-rw-r--r-- | btrfs-convert.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; |