summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/main.c b/common/main.c
index f042f3a..445cb18 100644
--- a/common/main.c
+++ b/common/main.c
@@ -919,7 +919,10 @@ int run_command (const char *cmd, int flag)
process_macros (token, finaltoken);
/* Extract arguments */
- argc = parse_line (finaltoken, argv);
+ if ((argc = parse_line (finaltoken, argv)) == 0) {
+ rc = -1; /* no command at all */
+ continue;
+ }
/* Look up command in command table */
if ((cmdtp = find_cmd(argv[0])) == NULL) {
@@ -945,9 +948,9 @@ int run_command (const char *cmd, int flag)
puts ("'bootd' recursion detected\n");
rc = -1;
continue;
- }
- else
+ } else {
flag |= CMD_FLAG_BOOTD;
+ }
}
#endif /* CFG_CMD_BOOTD */