aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index 2f762188..e652abd4 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.95 2009-05-16 11:48:47 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.2 2009/06/04 23:34:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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++) {