From: Jonathan Neuschäfer Date: Tue, 26 Jul 2011 12:49:19 +0000 (+0200) Subject: options.c: use a for loop in options_parse X-Git-Tag: release-0.20~105 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=686b36817f6b90783e9b0ea4d427cf7704c2b134;p=ncmpc.git options.c: use a for loop in options_parse It just looks cleaner. --- 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)