summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-07-21 04:00:27 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-21 02:44:13 -0700
commit066778ac7994bb574bd49281e8b225c3cd378f44 (patch)
tree55522b370210912ca6a4048f2269cdc1eb4a47fc /cli
parentd69b8b56d7be4a15e7eac9dcd45d9b19ac2dc0bf (diff)
cli: fix 'unrecognized command' error on empty command
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c
index d19703abb45..24c7dea0e00 100644
--- a/cli/src/cli-cmd.c
+++ b/cli/src/cli-cmd.c
@@ -48,6 +48,9 @@ cli_cmd_process (struct cli_state *state, int argc, char **argv)
word = &state->tree.root;
+ if (!argc)
+ return 0;
+
for (i = 0; i < argc; i++) {
next = cli_cmd_nextword (word, argv[i]);