Path: utzoo!attcan!uunet!cs.utexas.edu!samsung!think!snorkelwacker!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Is "if (!pointer)" as portable as "if (pointer == NULL)" ??? Keywords: portability, pointers, NULL Message-ID: <16438@haddock.ima.isc.com> Date: 11 Apr 90 16:42:24 GMT References: <656@hades.OZ> <1461@tkou02.enet.dec.com> <717@ssp11.idca.tds.philips.nl> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 10 In article <717@ssp11.idca.tds.philips.nl> dolf@idca.tds.PHILIPS.nl (Dolf Grunbauer) writes: >How about [skipping the test for NULL and writing just] > free(buffer) >The manual pages I know allow a NULL pointer and doing nothing in this case. >Is this generally true ? It's a new feature of the ANSI C library. It should be avoided if you need to retain portability to old implementations. Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint