diff options
author | Susant Sahani <ssahani@gmail.com> | 2021-01-15 20:26:25 +0100 |
---|---|---|
committer | Susant Sahani <ssahani@gmail.com> | 2021-01-15 20:26:25 +0100 |
commit | 6fa8acfb5a4fa0fd60937d85cdeff15242cb1324 (patch) | |
tree | 7f040b4eb262cd73f5e4de03fff3602b29f96b78 /src/network | |
parent | Merge pull request #18124 from ryncsn/initrd (diff) | |
download | systemd-6fa8acfb5a4fa0fd60937d85cdeff15242cb1324.tar.xz systemd-6fa8acfb5a4fa0fd60937d85cdeff15242cb1324.zip |
network: generator tighten variable scope used in loop
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/generator/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/generator/main.c b/src/network/generator/main.c index f9cace70f7..4eb3f3b2c2 100644 --- a/src/network/generator/main.c +++ b/src/network/generator/main.c @@ -166,7 +166,7 @@ static int parse_argv(int argc, char *argv[]) { static int run(int argc, char *argv[]) { _cleanup_(context_clear) Context context = {}; - int i, r; + int r; r = parse_argv(argc, argv); if (r <= 0) @@ -177,7 +177,7 @@ static int run(int argc, char *argv[]) { if (r < 0) return log_warning_errno(r, "Failed to parse kernel command line: %m"); } else { - for (i = optind; i < argc; i++) { + for (int i = optind; i < argc; i++) { _cleanup_free_ char *word = NULL; char *value; |