Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Dec 2003 07:45:40 -0800
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Doug Barton <DougB@dougbarton.net>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys _null.h
Message-ID:  <20031226154540.GA31330@dragon.nuxi.com>
In-Reply-To: <3FE9F86C.7060604@dougbarton.net>
References:  <200312230234.hBN2YPZw040276@repoman.freebsd.org> <3FE9F86C.7060604@dougbarton.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031226154540.GA31330>