svn commit: r337535 - head/sbin/init

Benjamin Kaduk bjkfbsd at gmail.com
Thu Aug 9 12:52:10 UTC 2018


On Thu, Aug 9, 2018 at 7:17 AM, Edward Tomasz Napierala <trasz at freebsd.org>
wrote:

> Author: trasz
> Date: Thu Aug  9 12:17:03 2018
> New Revision: 337535
> URL: https://svnweb.freebsd.org/changeset/base/337535
>
> Log:
>   Use NULLs instead of casted zeroes, for consistency.
>

It's probably helpful to note explicitly that these are not in arguments to
varargs functions,
in which case the explicit cast is needed in order to produce a program
that will have
correct behavior on all compliant compilers/systems.  (We do define NULL to
be a zero-with-cast,
but programs should not assume that NULL will be of pointer type -- "An
integer constant
expression with the value 0, or such an expression cast to type void *, is
called a null pointer constant".)

-Ben


More information about the svn-src-head mailing list