LWN.net Logo

Who maintains dpkg?

Who maintains dpkg?

Posted Mar 18, 2008 19:48 UTC (Tue) by nix (subscriber, #2304)
In reply to: Who maintains dpkg? by dw
Parent article: Who maintains dpkg?

Also, (void *)0 is a null pointer, even in a stdargs function: as Ian 
pointed out, NULL-the-macro may be defined as '0', which is not a pointer 
in a stdargs context and may have a different bit value.


(Log in to post comments)

Who maintains dpkg?

Posted Mar 21, 2008 4:22 UTC (Fri) by mikov (subscriber, #33179) [Link]

It took me by surprise that most people here expect NULL to be (void)0. My impression from the
C and C++ standards (which admittedly I haven't looked at recently) is that 0 is the
preferable definition for NULL. Not 0L and not (void)0.

(I know that GCC's headers define it as (void)0. However if it was changed to plain 0, all
correct ANSI C programs should continue to work!)

So, the only clearly correct, portable and even stylistically preferable solution in this case
is ((char*)0). I am surprised that there is discussion about it at all.


Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds