[lkml]   [2004]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Use NULL instead of integer 0 in security/selinux/

Linus Torvalds wrote:

> I've seen too damn many people mistake NULL and NUL (admit it, you've seen
> it too), and I've seen code like
> char c = NULL;

THIS is simply a case of the programmer not understanding what NULL
means. When I use '0' for a pointer, I know EXACTLY what I mean, and I
also know when '0' might be ambiguous, and when I don't know what I'm
allowed to do, then I play it REALLY safe and typecast 0 to exactly the
pointer type I need.

I suppose it's good form to use the safest syntax in all cases. Good
for readability for people who need more redundancy to read the code.

Perhaps the Linux kernel should have a convention where all NULL
pointers are typecast explicitly. I can hear the cries of pain already. :)

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: 2005-03-22 14:04    [W:0.127 / U:0.304 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site