Is #define NULL 0L ok?

Doug Gwyn gwyn at brl-vgr.ARPA
Mon Mar 12 16:31:50 AEST 1984


NO NO NO

You MUST cast the 0 to the proper pointer type when passing it as an
actual argument to a function:

	foo( (char *)0 );

for example.  There is no other way of guaranteeing that the function
gets a pointer of the proper type.



More information about the Comp.lang.c mailing list