From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6i8V-0006rF-BD for qemu-devel@nongnu.org; Wed, 20 May 2009 05:30:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6i8Q-0006qJ-Kc for qemu-devel@nongnu.org; Wed, 20 May 2009 05:30:54 -0400 Received: from [199.232.76.173] (port=32815 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6i8Q-0006qG-G9 for qemu-devel@nongnu.org; Wed, 20 May 2009 05:30:50 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51781) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M6i8Q-0008KI-4Y for qemu-devel@nongnu.org; Wed, 20 May 2009 05:30:50 -0400 References: <1242678676-19439-1-git-send-email-ehabkost@redhat.com> <20090518221705.GO2079@blackpad> <8763fxvbfk.fsf@pike.pond.sub.org> <20090519140201.GB4254@blackpad> <20090519144424.GD4254@blackpad> <20090519164440.GH4254@blackpad> From: Markus Armbruster Date: Wed, 20 May 2009 11:30:34 +0200 In-Reply-To: (malc's message of "Tue\, 19 May 2009 22\:40\:08 +0400 \(MSD\)") Message-ID: <87fxf06s05.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] Make qemu_alloc()/qemu_realloc() return NULL for size==0 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Eduardo Habkost , qemu-devel@nongnu.org malc writes: [Debate snipped...] > never return NULL. I've commited the thing i had in mind. Arguing this case has been a waste of time, for which I apologize. I'll try not to do that again. > [..snip..] > > P.S. It probably says something about my experience in the field, but the > only time i've encountered real-life usage of malloc(0) is in > that qcow2 case, the code was produced by a programmer who among > (numerous) other things wrote full C compiler and won IOCCC > twice, yet even his code failed to work. Read more code then, and more varied code.