From owner-freebsd-standards@FreeBSD.ORG Mon Mar 1 04:28:08 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C80916A4CE for ; Mon, 1 Mar 2004 04:28:08 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B75343D2D for ; Mon, 1 Mar 2004 04:28:07 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i21CRt6l054808; Mon, 1 Mar 2004 13:28:00 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 01 Mar 2004 13:24:07 +0100." Date: Mon, 01 Mar 2004 13:27:55 +0100 Message-ID: <54807.1078144075@critter.freebsd.dk> cc: stefan@fafoe.narf.at cc: freebsd-standards@FreeBSD.org Subject: Re: standards/62858: malloc(0) not C99 compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2004 12:28:08 -0000 In message , Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= writes: >Poul-Henning Kamp 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.