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
This commit is contained in:
parent
1c2c346f09
commit
e55a6575d9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298440
@ -160,10 +160,10 @@ compile_stream(struct s_command **link)
|
|||||||
char re[_POSIX2_LINE_MAX + 1];
|
char re[_POSIX2_LINE_MAX + 1];
|
||||||
int naddr; /* Number of addresses */
|
int naddr; /* Number of addresses */
|
||||||
|
|
||||||
stack = 0;
|
stack = NULL;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if ((p = cu_fgets(lbuf, sizeof(lbuf), NULL)) == NULL) {
|
if ((p = cu_fgets(lbuf, sizeof(lbuf), NULL)) == NULL) {
|
||||||
if (stack != 0)
|
if (stack != NULL)
|
||||||
errx(1, "%lu: %s: unexpected EOF (pending }'s)",
|
errx(1, "%lu: %s: unexpected EOF (pending }'s)",
|
||||||
linenum, fname);
|
linenum, fname);
|
||||||
return (link);
|
return (link);
|
||||||
@ -203,9 +203,9 @@ semicolon: EATSPACE();
|
|||||||
p = compile_addr(p, cmd->a2);
|
p = compile_addr(p, cmd->a2);
|
||||||
EATSPACE();
|
EATSPACE();
|
||||||
} else
|
} else
|
||||||
cmd->a2 = 0;
|
cmd->a2 = NULL;
|
||||||
} else
|
} else
|
||||||
cmd->a1 = cmd->a2 = 0;
|
cmd->a1 = cmd->a2 = NULL;
|
||||||
|
|
||||||
nonsel: /* Now parse the command */
|
nonsel: /* Now parse the command */
|
||||||
if (!*p)
|
if (!*p)
|
||||||
@ -241,7 +241,7 @@ semicolon: EATSPACE();
|
|||||||
* group is really just a noop.
|
* group is really just a noop.
|
||||||
*/
|
*/
|
||||||
cmd->nonsel = 1;
|
cmd->nonsel = 1;
|
||||||
if (stack == 0)
|
if (stack == NULL)
|
||||||
errx(1, "%lu: %s: unexpected }", linenum, fname);
|
errx(1, "%lu: %s: unexpected }", linenum, fname);
|
||||||
cmd2 = stack;
|
cmd2 = stack;
|
||||||
stack = cmd2->next;
|
stack = cmd2->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user