From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6qOt-0004tr-Rk for qemu-devel@nongnu.org; Wed, 20 May 2009 14:20:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6qOr-0004tc-97 for qemu-devel@nongnu.org; Wed, 20 May 2009 14:20:22 -0400 Received: from [199.232.76.173] (port=56636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6qOr-0004tV-31 for qemu-devel@nongnu.org; Wed, 20 May 2009 14:20:21 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:56909 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M6qOq-0003A5-Lh for qemu-devel@nongnu.org; Wed, 20 May 2009 14:20:20 -0400 Date: Wed, 20 May 2009 22:20:16 +0400 (MSD) From: malc In-Reply-To: <87fxf06s05.fsf@pike.pond.sub.org> Message-ID: 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> <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: Markus Armbruster Cc: Eduardo Habkost , qemu-devel@nongnu.org On Wed, 20 May 2009, Markus Armbruster wrote: > 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. Any suggested reading? -- mailto:av1474@comtv.ru