summaryrefslogtreecommitdiff
path: root/cmd/spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/spawn.c')
-rw-r--r--cmd/spawn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/spawn.c b/cmd/spawn.c
index eddbcb792b3..8829aa9728d 100644
--- a/cmd/spawn.c
+++ b/cmd/spawn.c
@@ -5,6 +5,7 @@
#include <command.h>
#include <console.h>
+#include <env.h>
#include <malloc.h>
#include <vsprintf.h>
#include <uthread.h>
@@ -169,7 +170,7 @@ static int do_wait(struct cmd_tbl *cmdtp, int flag, int argc,
} else {
for (i = 1; i < argc; i++) {
id = dectoul(argv[i], NULL);
- if (id < 0 || id > CONFIG_CMD_SPAWN_NUM_JOBS)
+ if (id < 1 || id > CONFIG_CMD_SPAWN_NUM_JOBS)
return CMD_RET_USAGE;
idx = (int)id - 1;
ret = wait_job(idx);