Re: [PATCH] Use NULL instead of integer 0 in security/selinux/

From: Martin Zwickel
Date: Thu Jul 08 2004 - 06:46:27 EST


On Thu, 8 Jul 2004 13:28:38 +0200
Michael Buesch <mbuesch@xxxxxxxxxx> bubbled:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Quoting "Richard B. Johnson" <root@xxxxxxxxxxxxxxxxxx>:
> > Because NULL is a valid pointer value. 0 is not. If you were
> > to make 0 valid, you would use "(void *)0", which is what
> > NULL just happens to be in all known architectures so far,
> > although that could change in an alternate universe.
>
> No, that is not true.
> In C/C++ this is true:
> NULL == 0


hmm...

include/linux/stddef.h:

#undef NULL
#if defined(__cplusplus)
#define NULL 0
#else
#define NULL ((void *)0)
#endif

--
MyExcuse:
fractal radiation jamming the backbone

Martin Zwickel <martin.zwickel@xxxxxxxxxxxxxx>
Research & Development

TechnoTrend AG <http://www.technotrend.de>

Attachment: pgp00000.pgp
Description: PGP signature