diff --git a/system/nxinit/parser.c b/system/nxinit/parser.c index cdd85362e..58da50340 100644 --- a/system/nxinit/parser.c +++ b/system/nxinit/parser.c @@ -46,7 +46,7 @@ int init_parse_arguments(FAR char *buf, bool dup, int argc, FAR char **argv) bool new = true; int i = 0; - while (*buf != '\0') + for (; ; ) { while (isblank(*buf)) { @@ -91,6 +91,11 @@ int init_parse_arguments(FAR char *buf, bool dup, int argc, FAR char **argv) } } + if (*buf == '\0') + { + break; + } + if (new) { argv[i++] = buf;