summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-25 20:57:02 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-25 20:57:02 -0800
commitab5f86275c070331c308a133afa3a648b347c062 (patch)
treef71945cb9fbc503ae348cb8a222f78683367681a /shell.c
parent2a1ddc58e4d2220feea7eba4623dac07a0f83f94 (diff)
downloadgit-ab5f86275c070331c308a133afa3a648b347c062.tar.gz
shell.c: complain on insufficient arguments.
Originally noticed by Tommi Virtanen, but done slightly differently. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell.c b/shell.c
index 2c4789e944..cd316185e9 100644
--- a/shell.c
+++ b/shell.c
@@ -5,8 +5,7 @@ static int do_generic_cmd(const char *me, char *arg)
{
const char *my_argv[4];
- arg = sq_dequote(arg);
- if (!arg)
+ if (!arg || !(arg = sq_dequote(arg)))
die("bad argument");
my_argv[0] = me;