Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!srcsip!coltrane!carpent From: carpent@SRC.Honeywell.COM (Todd Carpenter) Newsgroups: comp.sys.amiga.tech Subject: Re: Lattice 5.04 problem with free() Message-ID: <36954@srcsip.UUCP> Date: 30 Oct 89 22:01:33 GMT References: <36769@srcsip.UUCP> <1989Oct30.062445.1759@agate.berkeley.edu> <2933@nigel.udel.EDU> Sender: news@src.honeywell.COM Lines: 22 In-reply-to: new@udel.edu's message of 30 Oct 89 21:27:22 GMT In article <2933@nigel.udel.EDU> new@udel.edu (Darren New) writes: > > In article <1989Oct30.062445.1759@agate.berkeley.edu> mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer) writes: > >My copy of the dpANS C standard and of K&R 2 both show free as being > >void. The 5.02 docs show free as being an int, with an error if the > >block wasn't freed. > > Why would a free request fail? Or do you mean that it fails if > you attempt to free NULL or non-malloced memory or something? > -- Darren That is why I was checking it. Silly me, I read the Lattice Docs, and assumed it returned a value for a reason, and so I checked its return status. I didn't even think of cross referencing to an ANSI book. Heck, I had enough Guru's as it was, freeing up Null pointers... (on which I don't think it returned nicely) -Todd C. Following up on my #define SQR(x) (x*x) silliness, about 10 very kind and polite people pointed out the error. Thank you! I am tearing up my BEE degree and going back to 8th grade math for awhile.