summaryrefslogtreecommitdiffstats
path: root/commands/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/exec.c')
-rw-r--r--commands/exec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/commands/exec.c b/commands/exec.c
index b2b0fea238..4a232b6d05 100644
--- a/commands/exec.c
+++ b/commands/exec.c
@@ -34,10 +34,8 @@ static int do_exec(cmd_tbl_t * cmdtp, int argc, char *argv[])
int i;
char *script;
- if (argc < 2) {
- printf ("Usage:\n%s\n", cmdtp->usage);
- return 1;
- }
+ if (argc < 2)
+ return COMMAND_ERROR_USAGE;
for (i=1; i<argc; ++i) {
script = read_file(argv[i]);