From 6dc861b59bda6ac0957e1332930397c389b02db3 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Fri, 16 Sep 2011 14:05:20 +0530 Subject: cli: check wordcount to validate volume set help Change-Id: I6fedb5b2db4b137b5da5d7b8ef5ce793e1be207a BUG: 3543 Reviewed-on: http://review.gluster.com/434 Reviewed-by: Amar Tumballi 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 346baeed87d..00cba5782a7 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -582,10 +582,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); if (ret) -- cgit