[s1mp3-dev] Linux patch to s1mp3

M. Warner Losh imp at bsdimp.com
Mon Jun 19 11:54:48 CDT 2006


In message: <1caff7430606190842p45170074o5070df247f8a2375 at mail.gmail.com>
            "seventh guardian" <seventhguardian at gmail.com> writes:
: On 6/19/06, Ricardo Larrañaga <ricardo.larranaga at gmail.com> wrote:
: > sorry, didnt understood that
: >
: >
: > > #define NULL ((void *)0)
: > >
: 
: On compile time, NULL is replaced by ((void *)0).
: 
: We should stick to NULL though, as to keep that #def transparent to the code.

Actually, NULL should be defined as a plain '0'.  Comparison of
pointers against 0 is a special case in 'C' as is casing 0 to a
pointer.  Both should be the same.  In this context, the definition of
NULL doesn't matter.  It only matters when calling functions
w/old-school K&R prototypes or through "...".

I agree we should compare against NULL if the functionr returns a
pointer.

Warner



More information about the s1mp3-dev mailing list