On Wed, 27 May 1998, Glynn Clements wrote:

>
>Andrea Arcangeli wrote:
>
>> > But for testing null pointers, I use `!'. In this context, it seems
>> 
>> BAD. I worked in envinronments where NULL is ((void *)-1UL).
>
>That's _really bad_. ANSI C requires stdio.h to define NULL as being
>equivalent to zero.

Hmm, this is true in user land. Is it still true in kernel (not Linux)
developement?

>> If you use ! to check for a NULL pointer you make your code not
>> portable.
>
>Using ! to check for a NULL pointer is entirely portable.

If so excuse me, but for safe I will continue to use == NULL instead of !
;-).

Andrea[s] Arcangeli

Reply via email to