From: "Tom St Denis" Newsgroups: comp.os.msdos.djgpp References: <200107022219 DOT SAA04299 AT envy DOT delorie DOT com> <200107022351 DOT TAA05124 AT envy DOT delorie DOT com> <200107030106 DOT VAA05723 AT envy DOT delorie DOT com> Subject: Re: malloc() problem, DJDEV 203 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Message-ID: Date: Tue, 03 Jul 2001 01:16:40 GMT NNTP-Posting-Host: 24.112.8.23 X-Complaints-To: abuse AT home DOT net X-Trace: news3.rdc1.on.home.com 994123000 24.112.8.23 (Mon, 02 Jul 2001 18:16:40 PDT) NNTP-Posting-Date: Mon, 02 Jul 2001 18:16:40 PDT Organization: Excite AT Home - The Leader in Broadband http://home.com/faster To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "DJ Delorie" wrote in message news:200107030106 DOT VAA05723 AT envy DOT delorie DOT com... > > > > No, there are far too many programs that expect malloc(0) to succeed, > > > even if the standard allows it to fail. > > > > While I agree that seems practical it isn't "a good thing". > > Why? The standard allows it to fail, but it also allows it to > succeed. Why shouldn't we return a usable pointer to a zero-length > (well, 8 byte length) buffer? > > I'd rather djgpp not be on the list of systems that gratuitously cause > problems for the user, when it's just as easy to do something useful > instead. Oh I didn't know it was allowed to return a pointer to 0-bytes. Personally I would see that as a big nono, but who am I to say! Tom