diff options
author | Kaushik BV <kaushikbv@gluster.com> | 2011-09-16 14:04:27 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-18 23:56:38 -0700 |
commit | e5c185d8b66f807d6ed9a8873cdcd1be2654cf93 (patch) | |
tree | 13234405bf8793652bed57aaf847f404b0febce1 | |
parent | 46a0f48f95999112873a482c10ca6e7ec0312ed9 (diff) |
cli: check wordcount to validate volume set help
Change-Id: Ic0a59a6425b6c3c245048903e50336751fe72871
BUG: 3543
Reviewed-on: http://review.gluster.com/437
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r-- | cli/src/cli-cmd-parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 0568c9b3beb..88c2d93ab6d 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -382,10 +382,10 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options) if (ret) goto out; - if (!strcmp (volname, "help") && !words[3] && !words[4]) + if (!strcmp (volname, "help") && wordcount == 3 ) ret = dict_set_str (dict, "help", volname); - if (!strcmp (volname, "help-xml") && !words[3] && !words[4]) + if (!strcmp (volname, "help-xml") && wordcount == 3 ) ret = dict_set_str (dict, "help-xml", volname); for (i = 3; i < wordcount; i+=2) { |