diff options
author | Anand Avati <avati@gluster.com> | 2010-07-21 04:00:27 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-21 02:44:13 -0700 |
commit | 066778ac7994bb574bd49281e8b225c3cd378f44 (patch) | |
tree | 55522b370210912ca6a4048f2269cdc1eb4a47fc /cli/src/cli-cmd.c | |
parent | d69b8b56d7be4a15e7eac9dcd45d9b19ac2dc0bf (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c index d19703abb..24c7dea0e 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]); |