coding standards

Luke Kenneth Casson Leighton lkcl at switchboard.net
Sat May 9 13:14:44 GMT 1998


> As Andrew pointed out to me, the C standard does define NULL as a pointer
> with a value of zero.  void *ptr = 0 isn't wrong, per se., it's just that 
> it's much clearer to use NULL.

> #define NULL ((void*)0)

the atari lattice c compiler used to crash because of this (quite normal)
#define.  i vaguely recall assigning an int (which defaulted to 16 bit on
a 68000 processor) to NULL which caused the compiler-crash: i was used to
decent compilers that define int to be 32 bit :-) :-)



More information about the samba-technical mailing list