summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/utils/parse_options.c3
-rw-r--r--src/cli/CLI.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/utils/parse_options.c b/lib/utils/parse_options.c
index af457f3e..5f4fbd63 100644
--- a/lib/utils/parse_options.c
+++ b/lib/utils/parse_options.c
@@ -107,10 +107,9 @@ void parse_opts(int argc, char **argv, const struct options *opt,
longopts[ii].val = 0;
*/
- int option_index = 0;
while (1)
{
- int c = getopt_long(argc, argv, shortopts->buf, longopts, &option_index);
+ int c = getopt_long(argc, argv, shortopts->buf, longopts, NULL);
if (c == -1)
break;
diff --git a/src/cli/CLI.cpp b/src/cli/CLI.cpp
index b9c0397a..d4bb333d 100644
--- a/src/cli/CLI.cpp
+++ b/src/cli/CLI.cpp
@@ -282,10 +282,9 @@ int main(int argc, char** argv)
while (1)
{
- int option_index;
/* Do not use colons, arguments are handled after parsing all options. */
int c = getopt_long_only(argc, argv, "?Vrdlfyib",
- longopts, &option_index);
+ longopts, NULL);
#define SET_OP(newop) \
if (op != -1 && op != newop) \