lkml.org 
[lkml]   [2004]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Use NULL instead of integer 0 in security/selinux/
On Thu, 8 Jul 2004, Michael Poole wrote:
> Could you please elaborate the rules of English in which "An integer
> constant expresion with the value 0 [...] is called a null pointer
> constant" does not mean that 0 is a null pointer? 0 is certainly an
> integer constant expression with the value 0, so there must be
> something extraordinarily subtle in the second half of the sentence.

He's emphasising the difference between "null pointer constant" and "null
pointer", however NULL is defined as "an implementation-defined null
pointer constant", so any subtle issues regarding 0 apply equally well to
NULL.

Someone pointed out that there can be a difference between 0 and NULL when
passing the value to a function lacking a prototype. There's no guarantee
that the null pointers of different types have the same representation, so
passing NULL into such a function without an explicit cast would also be
incorrect.

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

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:1.190 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site