From: Lucas De Marchi Date: Sat, 14 Jan 2012 04:04:31 +0000 (-0200) Subject: Reduce scope of counter variable X-Git-Tag: v4~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31f1d0d306cb97434ae50ac2104697cd7444c755;p=thirdparty%2Fkmod.git Reduce scope of counter variable --- diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c index 14bad948..f6242560 100644 --- a/tools/kmod-depmod.c +++ b/tools/kmod-depmod.c @@ -2519,7 +2519,7 @@ static int is_version_number(const char *version) static int do_depmod(int argc, char *argv[]) { FILE *out = NULL; - int i, err = 0, all = 0, maybe_all = 0, n_config_paths = 0; + int err = 0, all = 0, maybe_all = 0, n_config_paths = 0; const char **config_paths = NULL; const char *root = ""; const char *system_map = NULL; @@ -2693,6 +2693,8 @@ static int do_depmod(int argc, char *argv[]) goto cmdline_modules_failed; } } else { + int i; + for (i = optind; i < argc; i++) { const char *path = argv[i]; struct kmod_module *mod;