diff options
author | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2008-12-17 22:01:18 +0300 |
---|---|---|
committer | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2008-12-18 20:30:22 +0300 |
commit | fef304c047ddf90c41726dc139f415c70d646019 (patch) | |
tree | ce2811b99ce5d3b919315b1c58f1c2a41ebacce7 /lib.c | |
parent | Mark handle_switch as static and don't export it from lib.h (diff) | |
download | sparse-fef304c047ddf90c41726dc139f415c70d646019.tar.gz sparse-fef304c047ddf90c41726dc139f415c70d646019.tar.bz2 sparse-fef304c047ddf90c41726dc139f415c70d646019.zip |
Handle missing argument to -D.
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -248,6 +248,10 @@ static char **handle_switch_D(char *arg, char **next) { const char *name = arg + 1; const char *value = "1"; + + if (!*name || isspace(*name)) + die("argument to `-D' is missing"); + for (;;) { char c; c = *++arg; |