Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: use of NULL Keywords: NULL zero 0 C Microsoft Message-ID: <9684@smoke.BRL.MIL> Date: 22 Feb 89 22:14:21 GMT References: <1167@unisec.usi.com. <5312@turnkey.TCC.COM. <9582@smoke.BRL.MIL. <399@twwells.uucp: <973@optilink.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <973@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes: >Never pass bare 0 as a pointer argument -- but use the stdio.h >definition of NULL, and the segmented architecture will NOT screw >you. Wrong. Use of uncast NULL as an argument to a function is never correct usage; although you can get away with it sometimes, it only "works" by accident and may quit working suddenly if the implementation changes. It is definitely not portable. Always cast 0 or NULL to the correct pointer type when used as a function argument.