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

From: Florian Weimer
Date: Sat Jul 10 2004 - 03:24:41 EST


* Michael Buesch:

> Yes, I never understood the reason for this ugly
> #if defined(__cplusplus) here.
> It works, but is IMHO unneccessary.

It's necessary because in C++, (void *)0 is not implicitly converted
to other pointer types. Having to write static_cast<T*>(NULL) is
certainly a bit too verbose.

There's also a C++ DR about this topic because people feel that there
should be a 0/NULL distinction for overloading. But this is
completely irrelevant to C code.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/