Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 1997 20:15:41 +0200 (MET DST)
From:      Eivind Eklund <perhaps@yes.no>
To:        Mike Smith <mike@smith.net.au>
Cc:        jonny@coppe.ufrj.br, phk@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG
Subject:   Re: cvs commit: src/gnu/usr.bin/as/config atof-ieee.c src/gnu/usr.bin/ld/rtld rtld.c src/gnu/usr.bin/man/man man.c 
Message-ID:  <199709201815.UAA17810@bitbox.follo.net>
In-Reply-To: Mike Smith's message of Fri, 19 Sep 1997 11:44:57 %2B0930
References:  <199709190205.XAA04697@gaia.coppe.ufrj.br> <199709190214.LAA03946@word.smith.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> > #define quoting(Poul-Henning Kamp)
> > //   Many places in the code NULL is used in integer context, where
> > //   plain 0 should be used.  This happens to work because we #define
> > //   NULL to 0, but is stylistically wrong and can cause problems
> > //   for people trying to port bits of code to other environments.
> > 
> > Is there any problem in defining NULL to ((void *)0) ?
> > 
> > Sorry if I'm forgetting something stupid...
> 
> Only that this list is inhabited by countless C lawyers.  8)
> 
> The standard defines NULL quite explicitly.  Deviating from the 
> standard is Bad.  0 -> NULL, but NULL !-> 0.

<C LAWYER>((void*)0) is a correct definition of NULL.  The other
correct definition is 0.</C LAWYER>

I think the tree should be made compile and lint cleanly with both
definitions; I might look into it some day, but don't volunteer my
time right now.  (I have other FreeBSD I've promised to do with a
much higher priority.)

Eivind.



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