qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [6531] toplevel: remove error handling from qemu_malloc


From: Stefan Weil
Subject: Re: [Qemu-devel] [6531] toplevel: remove error handling from qemu_malloc() callers ( Avi Kivity)
Date: Fri, 09 Apr 2010 21:41:24 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)

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 <address@hidden>
> Signed-off-by: Anthony Liguori <address@hidden>
>
> 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]));
...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]