summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-09-16 14:05:20 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-18 23:55:58 -0700
commit6dc861b59bda6ac0957e1332930397c389b02db3 (patch)
tree2dfc825d4d4d1bfb3ff379cfff038a63cb6f6253
parent8a4ec7be9b696959b701087bdffd1c6ad7393673 (diff)
cli: check wordcount to validate volume set help
Change-Id: I6fedb5b2db4b137b5da5d7b8ef5ce793e1be207a BUG: 3543 Reviewed-on: http://review.gluster.com/434 Reviewed-by: Amar Tumballi <amar@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--cli/src/cli-cmd-parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 346baeed8..00cba5782 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)