summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc/code.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-01-03 18:41:48 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-01-03 18:41:48 +0000
commit189731aad01e09db1807c78af421c615ed3a3242 (patch)
tree4cec623654b4e4e9da03bb00f36ea49755c8ca98 /sys/src/cmd/rc/code.c
parentc51a5cfa06dd982da839c4cfcba1610259d27e38 (diff)
rc: make it portable (for UNIX)
Fixup remaining Plan9 dependencies (chartorune()). Add Makefile for UNIX-like systems (tested with Linux and APE). Make error printing consistent, use Errstr() explicitely. Get rid of NSTATUS buffer limit, just malloc it.
Diffstat (limited to 'sys/src/cmd/rc/code.c')
-rw-r--r--sys/src/cmd/rc/code.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/rc/code.c b/sys/src/cmd/rc/code.c
index f39b3a573..d5427aff5 100644
--- a/sys/src/cmd/rc/code.c
+++ b/sys/src/cmd/rc/code.c
@@ -460,7 +460,7 @@ codeswitch(tree *t, int eflag)
int out; /* jump here to leave switch */
int nextcase; /* patch jump address to next case */
tree *tt;
- if(c1->child[0]==nil
+ if(c1->child[0]==0
|| c1->child[0]->type!=';'
|| !iscase(c1->child[0]->child[0])){
yyerror("case missing in switch");