Is "if (!pointer)" as portable as "if (pointer == NULL)" ???
Henry Spencer
henry at utzoo.uucp
Thu Apr 12 02:35:55 AEST 1990
In article <717 at ssp11.idca.tds.philips.nl> dolf at idca.tds.PHILIPS.nl (Dolf Grunbauer) writes:
>How about just a:
> free(buffer)
>
>The manual pages I know allow a NULL pointer and doing nothing in this case.
>Is this generally true ?
Unfortunately, no. Old implementations of free() explode when given NULL.
--
With features like this, | Henry Spencer at U of Toronto Zoology
who needs bugs? | uunet!attcan!utzoo!henry henry at zoo.toronto.edu
More information about the Comp.lang.c
mailing list