diff options
-rw-r--r-- | cli/src/cli-cmd-parser.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 92626df76b5..a8ac5410640 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -643,10 +643,13 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options) ret = dict_set_str (dict, "volname", volname); - if (!strcmp (volname, "help") && !words[3] && !words[4]) + if (ret) + goto out; + + 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) |