From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0K5I-0006qL-Eq for qemu-devel@nongnu.org; Fri, 09 Apr 2010 15:41:44 -0400 Received: from [140.186.70.92] (port=42393 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0K5H-0006pv-81 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 15:41:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0K5F-0002aV-5p for qemu-devel@nongnu.org; Fri, 09 Apr 2010 15:41:43 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:58709) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0K5E-0002aN-OK for qemu-devel@nongnu.org; Fri, 09 Apr 2010 15:41:41 -0400 Message-ID: <4BBF82E4.4010505@mail.berlios.de> Date: Fri, 09 Apr 2010 21:41:24 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [6531] toplevel: remove error handling from qemu_malloc() callers ( Avi Kivity) References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Avi Kivity Cc: qemu-devel@nongnu.org Anthony Liguori schrieb: > Revision: 6531 > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6531 > Author: aliguori > Date: 2009-02-05 22:06:18 +0000 (Thu, 05 Feb 2009) > > Log Message: > ----------- > toplevel: remove error handling from qemu_malloc() callers (Avi Kivity) > > Signed-off-by: Avi Kivity > Signed-off-by: Anthony Liguori > > Modified Paths: > -------------- > trunk/aio.c > trunk/buffered_file.c > trunk/console.c > trunk/cris-dis.c > trunk/curses.c > trunk/device_tree.c > trunk/exec.c > trunk/gdbstub.c ... > > Modified: trunk/cris-dis.c > =================================================================== > --- trunk/cris-dis.c 2009-02-05 22:06:11 UTC (rev 6530) > +++ trunk/cris-dis.c 2009-02-05 22:06:18 UTC (rev 6531) > @@ -26,6 +26,8 @@ > //#include "libiberty.h" > > > +void *qemu_malloc(size_t len); /* can't include qemu-common.h here */ Do you still know the reason for that comment? Is it still valid? i386-dis.c includes qemu-common.h. I have a patch which needs qemu-common.h for cris-dis.c, too. Regards, Stefan > + > #define FALSE 0 > #define TRUE 1 > #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof > (STR2) - 1) == 0) > @@ -1401,44 +1403,32 @@ > /* Allocate and clear the opcode-table. */ > if (opc_table == NULL) > { > - opc_table = malloc (65536 * sizeof (opc_table[0])); > - if (opc_table == NULL) > - return NULL; > + opc_table = qemu_malloc (65536 * sizeof (opc_table[0])); ...