From e5c185d8b66f807d6ed9a8873cdcd1be2654cf93 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Fri, 16 Sep 2011 14:04:27 +0530 Subject: 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 Reviewed-by: Vijay Bellur --- cli/src/cli-cmd-parser.c | 4 ++-- 1 file 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) { -- cgit