summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-10-10 22:09:23 +0000
committernicm <nicm@openbsd.org>2015-10-10 22:09:23 +0000
commit091f90de2133da84f8e7f3902b3c85818dd8e887 (patch)
tree7daefbf94514ddcb29ec08068beaa59938f46ac2
parentanother pledge argument reorder for sake of re-audit (diff)
downloadwireguard-openbsd-091f90de2133da84f8e7f3902b3c85818dd8e887.tar.xz
wireguard-openbsd-091f90de2133da84f8e7f3902b3c85818dd8e887.zip
Add a define for the invalid state, from mksh via Michael McConville.
ok millert
-rw-r--r--bin/ksh/lex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c
index d0dec05f99c..568aec98d88 100644
--- a/bin/ksh/lex.c
+++ b/bin/ksh/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.58 2015/10/09 19:49:08 millert Exp $ */
+/* $OpenBSD: lex.c,v 1.59 2015/10/10 22:09:23 nicm Exp $ */
/*
* lexical analysis and source input
@@ -12,6 +12,7 @@
/*
* states while lexing word
*/
+#define SINVALID -1 /* invalid state */
#define SBASE 0 /* outside any lexical constructs */
#define SWORD 1 /* implicit quoting for substitute() */
#define SLETPAREN 2 /* inside (( )), implicit quoting */
@@ -140,7 +141,7 @@ yylex(int cf)
Again:
- states[0].ls_state = -1;
+ states[0].ls_state = SINVALID;
states[0].ls_info.base = NULL;
statep = &states[1];
state_info.base = states;