Xref: utzoo comp.std.c:961 comp.lang.c:17294 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ig!arizona!gmt From: gmt@arizona.edu (Gregg Townsend) Newsgroups: comp.std.c,comp.lang.c Subject: Re: realloc Message-ID: <9974@megaron.arizona.edu> Date: 30 Mar 89 18:40:10 GMT References: <10170@bloom-beacon.MIT.EDU> <10032@ihlpb.ATT.COM> <1002@calvin.EE.CORNELL.EDU> Reply-To: gmt@arizona.edu (Gregg Townsend) Organization: U of Arizona CS Dept, Tucson Lines: 7 realloc() is sometimes used to grow a list of objects as entries are added. If it's to be used with an initially empty list, realloc() must accept a null pointer as its frist argument -- because ANSI C allows malloc() to return NULL in response to a request of size zero! Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721 +1 602 621 4325 gmt@Arizona.EDU 110 57 16 W / 32 13 45 N / +758m