From cdfe543fc8cbdf82b4656126a4b69953d1864fdd Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Tue, 12 Oct 2010 15:13:28 +0800 Subject: [PATCH] virsh: allow zero length arguments the following command is allowed at shell, we also make it allowed at virsh shell. Signed-off-by: Lai Jiangshan --- tools/virsh.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index c79ac23503..65f26df2ff 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -10339,7 +10339,6 @@ vshCommandGetToken(vshControl *ctl, char *str, char **end, char **res) int sz = 0; char *p = str; char *q = vshStrdup(ctl, str); - char *tkstr = NULL; *end = NULL; *res = q; @@ -10373,7 +10372,6 @@ vshCommandGetToken(vshControl *ctl, char *str, char **end, char **res) } else { tk = VSH_TK_DATA; } - tkstr = p; /* begin of token */ } if (*p == '"') { @@ -10389,8 +10387,6 @@ vshCommandGetToken(vshControl *ctl, char *str, char **end, char **res) vshError(ctl, "%s", _("missing \"")); return VSH_TK_ERROR; } - if (tkstr == NULL || *tkstr == '\0' || sz == 0) - return VSH_TK_END; *q = '\0'; *end = p;