diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-21 21:30:51 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-21 21:30:51 +0000 |
commit | 3f525b8a34160ddf831c32440a5a5a4d4cb7505f (patch) | |
tree | d753de5bc66c4fb0f0c9f9d3989e36279de1f30e /usr.bin/sed | |
parent | 289cd3b2aac5bf6127bf34eff1bb09db512cc8c7 (diff) | |
download | FreeBSD-src-3f525b8a34160ddf831c32440a5a5a4d4cb7505f.zip FreeBSD-src-3f525b8a34160ddf831c32440a5a5a4d4cb7505f.tar.gz |
kernel: use our nitems() macro when it is available through param.h.
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/compile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index 2d7f8d2..b5bc3e2 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -160,10 +160,10 @@ compile_stream(struct s_command **link) char re[_POSIX2_LINE_MAX + 1]; int naddr; /* Number of addresses */ - stack = 0; + stack = NULL; for (;;) { if ((p = cu_fgets(lbuf, sizeof(lbuf), NULL)) == NULL) { - if (stack != 0) + if (stack != NULL) errx(1, "%lu: %s: unexpected EOF (pending }'s)", linenum, fname); return (link); @@ -203,9 +203,9 @@ semicolon: EATSPACE(); p = compile_addr(p, cmd->a2); EATSPACE(); } else - cmd->a2 = 0; + cmd->a2 = NULL; } else - cmd->a1 = cmd->a2 = 0; + cmd->a1 = cmd->a2 = NULL; nonsel: /* Now parse the command */ if (!*p) @@ -241,7 +241,7 @@ nonsel: /* Now parse the command */ * group is really just a noop. */ cmd->nonsel = 1; - if (stack == 0) + if (stack == NULL) errx(1, "%lu: %s: unexpected }", linenum, fname); cmd2 = stack; stack = cmd2->next; |