[lkml]   [2007]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Style Question
On Mar 11, 2007, at 16:41:51, Daniel Hazelton wrote:
> On Sunday 11 March 2007 16:35:50 Jan Engelhardt wrote:
>> On Mar 11 2007 22:15, Cong WANG wrote:
>>> So can I say using NULL is better than 0 in kernel?
>> On what basis? Do you even know what NULL is defined as in (C, not
>> C++) userspace? Think about it.
> IIRC, the glibc and GCC headers define NULL as (void*)0 :)

On the other hand when __cplusplus is defined they define it to the
"__null" builtin, which GCC uses to give type conversion errors for
"int foo = NULL" but not "char *foo = NULL". A "((void *)0)"
definition gives C++ type errors for both due to the broken C++ void
pointer conversion problems.

Kyle Moffett

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-03-11 23:05    [W:0.059 / U:10.616 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site