Abandon NULL for (0)

Henry Spencer henry at utzoo.uucp
Sat Oct 14 02:41:44 AEST 1989


In article <10898 at riks.csl.sony.co.jp> diamond at riks. (Norman Diamond) writes:
>>#define NULLF (FILE *)0
>
>Mixed feelings about this one...

Besides, what good is it?  One very seldom has to pass a null FILE pointer
to a function -- none of the stdio functions, the primary customers for
FILE pointers, accept one -- and that's the only place where the cast is
needed.  `if (f == NULL)' strikes me as no less readable than the equivalent
with NULLF, and it means exactly the same thing.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list