summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd.c
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-07-21 04:00:27 +0000
committergluster-ant <bugzilla-bot@gluster.org>2010-07-21 04:00:27 +0000
commitd762598ce482e4149e49e6b96f2c2cc0ae736337 (patch)
tree44ef828378a010b78d8d0dd3ff0ceb765c360461 /cli/src/cli-cmd.c
parentac3586aef2ed7591275434a3c5c1e2b76ef9b427 (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/src/cli-cmd.c')
-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 d19703abb4..24c7dea0e0 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]);