Remove three distracting aliases for NULL.
authormmcc <mmcc@openbsd.org>
Thu, 15 Oct 2015 22:53:50 +0000 (22:53 +0000)
committermmcc <mmcc@openbsd.org>
Thu, 15 Oct 2015 22:53:50 +0000 (22:53 +0000)
ok nicm@

bin/ksh/syn.c
bin/ksh/tree.h

index 05a55d8..23ffaa2 100644 (file)
@@ -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:
index 2c613bd..5b3166b 100644 (file)
@@ -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.
  */