aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index fc87558d..68dd06a3 100644
--- a/cmd.c
+++ b/cmd.c
@@ -108,8 +108,10 @@ cmd_parse(int argc, char **argv, char **cause)
int opt;
*cause = NULL;
- if (argc == 0)
+ if (argc == 0) {
+ xasprintf(cause, "no command");
return (NULL);
+ }
entry = NULL;
for (entryp = cmd_table; *entryp != NULL; entryp++) {