diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:06:18 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:06:18 +0000 |
commit | 1eec614b36390be66430ed6dd0ce47a6f2f0ae1a (patch) | |
tree | fa9174028d54ea9a531a77d05996688fc704fadd /cris-dis.c | |
parent | 0d0266a53b4c80ab08c093c36bb3a7bbb29cc3e5 (diff) |
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cris-dis.c')
-rw-r--r-- | cris-dis.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/cris-dis.c b/cris-dis.c index 0781b0886b..ba6990758c 100644 --- a/cris-dis.c +++ b/cris-dis.c @@ -26,6 +26,8 @@ //#include "libiberty.h" +void *qemu_malloc(size_t len); /* can't include qemu-common.h here */ + #define FALSE 0 #define TRUE 1 #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) @@ -1401,44 +1403,32 @@ get_opcode_entry (unsigned int insn, /* 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])); memset (opc_table, 0, 65536 * sizeof (const struct cris_opcode *)); dip_prefixes - = malloc (65536 * sizeof (const struct cris_opcode **)); - if (dip_prefixes == NULL) - return NULL; + = qemu_malloc (65536 * sizeof (const struct cris_opcode **)); memset (dip_prefixes, 0, 65536 * sizeof (dip_prefixes[0])); bdapq_m1_prefixes - = malloc (65536 * sizeof (const struct cris_opcode **)); - if (bdapq_m1_prefixes == NULL) - return NULL; + = qemu_malloc (65536 * sizeof (const struct cris_opcode **)); memset (bdapq_m1_prefixes, 0, 65536 * sizeof (bdapq_m1_prefixes[0])); bdapq_m2_prefixes - = malloc (65536 * sizeof (const struct cris_opcode **)); - if (bdapq_m2_prefixes == NULL) - return NULL; + = qemu_malloc (65536 * sizeof (const struct cris_opcode **)); memset (bdapq_m2_prefixes, 0, 65536 * sizeof (bdapq_m2_prefixes[0])); bdapq_m4_prefixes - = malloc (65536 * sizeof (const struct cris_opcode **)); - if (bdapq_m4_prefixes == NULL) - return NULL; + = qemu_malloc (65536 * sizeof (const struct cris_opcode **)); memset (bdapq_m4_prefixes, 0, 65536 * sizeof (bdapq_m4_prefixes[0])); rest_prefixes - = malloc (65536 * sizeof (const struct cris_opcode **)); - if (rest_prefixes == NULL) - return NULL; + = qemu_malloc (65536 * sizeof (const struct cris_opcode **)); memset (rest_prefixes, 0, 65536 * sizeof (rest_prefixes[0])); } |