summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-10-15 22:53:51 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-10-15 22:53:51 +0000
commit285ee2868cf16446492d54e6400efa987c5aafe6 (patch)
treec42b91a3e87d9f8753c92b7b0bf7f781da810809 /bin
parent65b7656aa48506908cbb28b51fba3c9c5849a61d (diff)
Remove three distracting aliases for NULL.
ok nicm@
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/syn.c20
-rw-r--r--bin/ksh/tree.h6
2 files changed, 11 insertions, 15 deletions
diff --git a/bin/ksh/syn.c b/bin/ksh/syn.c
index 05a55d8b3c7..23ffaa2b700 100644
--- a/bin/ksh/syn.c
+++ b/bin/ksh/syn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syn.c,v 1.34 2015/10/06 21:21:39 nicm Exp $ */
+/* $OpenBSD: syn.c,v 1.35 2015/10/15 22:53:50 mmcc Exp $ */
/*
* shell parser (C version)
@@ -78,9 +78,9 @@ pipeline(int cf)
if ((p = get_command(CONTIN)) == NULL)
syntaxerr(NULL);
if (tl == NULL)
- t = tl = block(TPIPE, t, p, NOWORDS);
+ t = tl = block(TPIPE, t, p, NULL);
else
- tl = tl->right = block(TPIPE, tl->right, p, NOWORDS);
+ tl = tl->right = block(TPIPE, tl->right, p, NULL);
}
reject = true;
}
@@ -98,7 +98,7 @@ andor(void)
while ((c = token(0)) == LOGAND || c == LOGOR) {
if ((p = pipeline(CONTIN)) == NULL)
syntaxerr(NULL);
- t = block(c == LOGAND? TAND: TOR, t, p, NOWORDS);
+ t = block(c == LOGAND? TAND: TOR, t, p, NULL);
}
reject = true;
}
@@ -126,15 +126,15 @@ c_list(int multi)
break;
else if (c == '&' || c == COPROC)
p = block(c == '&' ? TASYNC : TCOPROC,
- p, NOBLOCK, NOWORDS);
+ p, NULL, NULL);
else if (c != ';')
have_sep = 0;
if (!t)
t = p;
else if (!tl)
- t = tl = block(TLIST, t, p, NOWORDS);
+ t = tl = block(TLIST, t, p, NULL);
else
- tl = tl->right = block(TLIST, tl->right, p, NOWORDS);
+ tl = tl->right = block(TLIST, tl->right, p, NULL);
if (!have_sep)
break;
}
@@ -183,7 +183,7 @@ nested(int type, int smark, int emark)
t = c_list(true);
musthave(emark, KEYWORD|ALIAS);
nesting_pop(&old_nesting);
- return (block(type, t, NOBLOCK, NOWORDS));
+ return (block(type, t, NULL, NULL));
}
static struct op *
@@ -356,7 +356,7 @@ get_command(int cf)
t = pipeline(0);
if (t == NULL)
syntaxerr(NULL);
- t = block(TBANG, NOBLOCK, t, NOWORDS);
+ t = block(TBANG, NULL, t, NULL);
break;
case TIME:
@@ -367,7 +367,7 @@ get_command(int cf)
t->str[0] = '\0'; /* TF_* flags */
t->str[1] = '\0';
}
- t = block(TTIME, t, NOBLOCK, NOWORDS);
+ t = block(TTIME, t, NULL, NULL);
break;
case FUNCTION:
diff --git a/bin/ksh/tree.h b/bin/ksh/tree.h
index 2c613bd20f9..5b3166b2d4a 100644
--- a/bin/ksh/tree.h
+++ b/bin/ksh/tree.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tree.h,v 1.11 2015/10/06 21:19:06 nicm Exp $ */
+/* $OpenBSD: tree.h,v 1.12 2015/10/15 22:53:50 mmcc Exp $ */
/*
* command trees for compile/execute
@@ -6,10 +6,6 @@
/* $From: tree.h,v 1.3 1994/05/31 13:34:34 michael Exp $ */
-#define NOBLOCK ((struct op *)NULL)
-#define NOWORD ((char *)NULL)
-#define NOWORDS ((char **)NULL)
-
/*
* Description of a command or an operation on commands.
*/