]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pid1: remove unnecessary counter
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 11 Dec 2016 04:07:46 +0000 (23:07 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 11 Dec 2016 05:21:35 +0000 (00:21 -0500)
The loop must terminate after at most three iterations anyway.

src/core/load-fragment.c

index 6b36b2fc3a5a549b6ba2d4b9a967a9d9027f6854..687cd1dd317499ed8cb3c062caa11f215a7b9138 100644 (file)
@@ -606,7 +606,6 @@ int config_parse_exec(
                 _cleanup_strv_free_ char **n = NULL;
                 size_t nlen = 0, nbufsize = 0;
                 const char *f;
-                int i;
 
                 semicolon = false;
 
@@ -615,7 +614,7 @@ int config_parse_exec(
                         return 0;
 
                 f = firstword;
-                for (i = 0; i < 3; i++) {
+                for (;;) {
                         /* We accept an absolute path as first argument.
                          * If it's prefixed with - and the path doesn't exist,
                          * we ignore it instead of erroring out;