🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1910

Re: Lattice 5.04 problem with free()

#1910
From: Todd Carpenter
Date: Mon, 30 Oct 1989 22:01
22 lines
1551 bytes
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.
Technical Details
Message-ID: <36954@srcsip.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!srcsip!coltrane!carpent
References: <36769@srcsip.UUCP> <1989Oct30.062445.1759@agate.berkeley.edu> <2933@nigel.udel.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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