From 686b36817f6b90783e9b0ea4d427cf7704c2b134 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Tue, 26 Jul 2011 14:49:19 +0200 Subject: [PATCH] options.c: use a for loop in options_parse It just looks cleaner. --- src/options.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/options.c b/src/options.c index 53e68d0..2f21dc0 100644 --- a/src/options.c +++ b/src/options.c @@ -287,8 +287,7 @@ options_parse(int argc, const char *argv[]) const arg_opt_t *opt = NULL; option_callback_fn_t option_cb = handle_option; - i=1; - while (i < argc) { + for (i = 1; i < argc; i++) { const char *arg = argv[i]; size_t len = strlen(arg); @@ -352,7 +351,6 @@ options_parse(int argc, const char *argv[]) } else option_error(ERROR_BAD_ARGUMENT, arg, NULL); } - i++; } if (opt && opt->argument == NULL) -- 2.30.2