cvs commit: src/sys/sys _null.h
obrien at FreeBSD.org
Fri Dec 26 07:45:45 PST 2003
On Wed, Dec 24, 2003 at 12:34:52PM -0800, Doug Barton wrote:
> >peter 2003/12/22 18:34:25 PST
> > FreeBSD src repository
> > Modified files:
> > sys/sys _null.h
> > Log:
> > Don peril sensitive sunglasses and set NULL to an actual pointer type,
> > but *only* for the kernel. We can do this because the kernel is not a
> > standard C application environment. This would have stopped the recent
> > mtx_* arg NULL/MTX_DEF mixups from going unnoticed for so long.
> > Revision Changes Path
> > 1.3 +4 -0 src/sys/sys/_null.h
> Is this worth a __FreeBSD_version bump?
Nope. This isn't an ABI change. Both "0" and "(void *)0" are valid NULL
definitions in ANSI-C. Peter's change only makes us code correctly,
using "0" rather than "NULL" for int variables. Most likely using "NULL"
with int variables is ANSI-C undefined behavior.
More information about the cvs-all