Date: Thu, 2 Dec 2010 20:03:06 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Lawrence Stewart <lstewart@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au> Subject: Re: svn commit: r216101 - head/sys/netinet Message-ID: <20101202200155.R2170@besplex.bde.org> In-Reply-To: <4CF72434.8@freebsd.org> References: <201012020047.oB20lte1062102@svn.freebsd.org> <20101202141735.B1174@besplex.bde.org> <4CF72434.8@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2 Dec 2010, Lawrence Stewart wrote: > On 12/02/10 14:45, Bruce Evans wrote: >> On Thu, 2 Dec 2010, Lawrence Stewart wrote: >> >>> Log: >>> Pass NULL instead of 0 for the th pointer value. NULL != 0 on all >>> platforms. >> ... >> The last case is essentially what applies in function calls. Now the >> conversion of either NULL or 0 or any other null pointer constant to a >> null pointer is done according to the prototype. The results are not >> necessarily the same like I said above, but they compare the same. >> Thus spelling the null pointer constant as 0 made no difference to >> the higher-level results on any platform (unless you do something like >> memcmp of null pointers, and use an exotic platform where null pointers >> have different representations). It was just a style bug. > > hmm, thanks for the informative response. I'm not sure where I got it in > my head that NULL != 0 on all platforms, but you've now corrected that > bit of misunderstanding. For the record, the now known to be bogus > commit log was my own creation based on my (mis)understanding and did > not come from David. > > When it comes time to MFC, should I use the bogus log message or correct > it to something like: > > "Fix a minor style nit by passing NULL instead of 0 for the th pointer > value." Thanks. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101202200155.R2170>