10 commandments and the NULL pointer?

Doug Gwyn gwyn at smoke.brl.mil
Fri Nov 9 18:28:49 AEST 1990


In article <2390 at krafla.rhi.hi.is> einari at rhi.hi.is (Einar Indridason) writes:
>	x = do_something(NULL, NULL, NULL);
>	/* is            ^^^^  ^^^^  ^^^^  this right or should I write: */
>	x = do_something( (int *)NULL, (double *)NULL, (char *)NULL );

Use the latter.  The former might or might not work, depending on system
details.



More information about the Comp.lang.c mailing list