lkml.org 
[lkml]   [2004]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Use NULL instead of integer 0 in security/selinux/
From
Date
On Jul  9, 2004, Herbert Xu <herbert@gondor.apana.org.au> wrote:

> On Fri, Jul 09, 2004 at 09:43:18PM -0400, Kyle Moffett wrote:
>>
>> most clear? These are all "logically" correct, for the most part, but
>> as humans we have certain readability standards.

> Nope, B is undefined.

Nope, B is implementation-defined. The conversion from pointers to
integers is implementation-defined, and it's meant to be unsurprising
to those familiar with the architecture. I.e., if you can
zero-initialize a pointer and get a NULL pointer back, it's quite
likely that a NULL pointer will convert back to (int)0, even though
it's not required by the C Standard AFAICT.

>> int some_function(int a, void *b, char *c, unsigned char d, int e);

>> B) int res = some_function(NULL,NULL,NULL,NULL,NULL);

--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
-
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:0.997 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site