Date: Mon, 01 Mar 2004 13:27:55 +0100 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Cc: freebsd-standards@FreeBSD.org Subject: Re: standards/62858: malloc(0) not C99 compliant Message-ID: <54807.1078144075@critter.freebsd.dk> In-Reply-To: Your message of "Mon, 01 Mar 2004 13:24:07 %2B0100." <xzpznb0iwm0.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <xzpznb0iwm0.fsf@dwp.des.no>, Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= writes: >Poul-Henning Kamp <phk@FreeBSD.org> writes: >> This is a deliberate choice. Handling zero-size pointers correctly >> in malloc(3) would be a rather involved and is currently not high >> on the todolist. A good patch might change that. > >The standard does allow returning NULL, you know. Yes, but unfortunately that broke more software than I cared for arguing with authors about. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54807.1078144075>