fix a copy/paste bug leading to a bad loop limitation
authorJohn Crispin <blogic@openwrt.org>
Sat, 13 Sep 2014 01:15:21 +0000 (03:15 +0200)
committerJohn Crispin <blogic@openwrt.org>
Sat, 13 Sep 2014 01:17:24 +0000 (03:17 +0200)
https://dev.openwrt.org/ticket/17864

Signed-off-by: John Crispin <blogic@openwrt.org>
inittab.c

index 677ec47cfab886e11b1ccf37cca20deff5713f46..c8540b199e2a8906c970ccad13a6e6bb25799ea4 100644 (file)
--- a/inittab.c
+++ b/inittab.c
@@ -279,7 +279,7 @@ void procd_inittab(void)
                };
 
                tok = strtok(tags[TAG_PROCESS], " ");
-               for (i = 0; i < (MAX_ARGS - i - 1) && tok; i++) {
+               for (i = 0; i < (MAX_ARGS - 1) && tok; i++) {
                        a->argv[i] = tok;
                        tok = strtok(NULL, " ");
                }