diff options
author | 2013-06-03 18:40:05 +0000 | |
---|---|---|
committer | 2013-06-03 18:40:05 +0000 | |
commit | 6d5ee27d8216ab5b3fabae083febaab769a1700c (patch) | |
tree | e41d34bf02b7b3230a369235f6fec1ebbf723e6d | |
parent | regen (diff) | |
download | wireguard-openbsd-6d5ee27d8216ab5b3fabae083febaab769a1700c.tar.xz wireguard-openbsd-6d5ee27d8216ab5b3fabae083febaab769a1700c.zip |
for var in; do ... shouldn't be interpreted as for var; do ...
Fix by returning an empty token list instead of NULL to consumers.
Brings base ksh more in line with POSIX.
-rw-r--r-- | bin/ksh/syn.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/bin/ksh/syn.c b/bin/ksh/syn.c index 9b7451a318e..2e92489de40 100644 --- a/bin/ksh/syn.c +++ b/bin/ksh/syn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syn.c,v 1.28 2008/07/23 16:34:38 jaredy Exp $ */ +/* $OpenBSD: syn.c,v 1.29 2013/06/03 18:40:05 jca Exp $ */ /* * shell parser (C version) @@ -598,13 +598,8 @@ wordlist(void) XPput(args, yylval.cp); if (c != '\n' && c != ';') syntaxerr((char *) 0); - if (XPsize(args) == 0) { - XPfree(args); - return NULL; - } else { - XPput(args, NULL); - return (char **) XPclose(args); - } + XPput(args, NULL); + return (char **) XPclose(args); } /* |