Date: Thu, 21 Apr 2016 16:35:49 -0500 From: Pedro Giffuni <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298440 - head/usr.bin/sed Message-ID: <145b413d-b9d6-a759-9135-83328003acaf@FreeBSD.org> In-Reply-To: <201604212130.u3LLUpiU044544@repo.freebsd.org> References: <201604212130.u3LLUpiU044544@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Oops wrong log message.... It's supposed to be: sed: use NULL instead of zero for pointers. On 04/21/16 16:30, Pedro F. Giffuni wrote: > Author: pfg > Date: Thu Apr 21 21:30:51 2016 > New Revision: 298440 > URL: https://svnweb.freebsd.org/changeset/base/298440 > > Log: > 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 > > Modified: > head/usr.bin/sed/compile.c > > Modified: head/usr.bin/sed/compile.c > ============================================================================== > --- head/usr.bin/sed/compile.c Thu Apr 21 21:13:41 2016 (r298439) > +++ head/usr.bin/sed/compile.c Thu Apr 21 21:30:51 2016 (r298440) > @@ -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; >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?145b413d-b9d6-a759-9135-83328003acaf>