aboutsummaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:06:18 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:06:18 +0000
commit1eec614b36390be66430ed6dd0ce47a6f2f0ae1a (patch)
treefa9174028d54ea9a531a77d05996688fc704fadd /vl.c
parent0d0266a53b4c80ab08c093c36bb3a7bbb29cc3e5 (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 'vl.c')
-rw-r--r--vl.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/vl.c b/vl.c
index 36765378a..aff2b2ce3 100644
--- a/vl.c
+++ b/vl.c
@@ -546,8 +546,6 @@ QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func,
QEMUPutMouseEntry *s, *cursor;
s = qemu_mallocz(sizeof(QEMUPutMouseEntry));
- if (!s)
- return NULL;
s->qemu_put_mouse_event = func;
s->qemu_put_mouse_event_opaque = opaque;
@@ -1098,8 +1096,6 @@ static QEMUClock *qemu_new_clock(int type)
{
QEMUClock *clock;
clock = qemu_mallocz(sizeof(QEMUClock));
- if (!clock)
- return NULL;
clock->type = type;
return clock;
}
@@ -2808,10 +2804,6 @@ DisplayState *get_displaystate(void)
static void dumb_display_init(void)
{
DisplayState *ds = qemu_mallocz(sizeof(DisplayState));
- if (ds == NULL) {
- fprintf(stderr, "dumb_display_init: DisplayState allocation failed\n");
- exit(1);
- }
ds->surface = qemu_create_displaysurface(640, 480, 32, 640 * 4);
register_displaystate(ds);
}
@@ -2863,8 +2855,6 @@ int qemu_set_fd_handler2(int fd,
goto found;
}
ioh = qemu_mallocz(sizeof(IOHandlerRecord));
- if (!ioh)
- return -1;
ioh->next = first_io_handler;
first_io_handler = ioh;
found:
@@ -2902,8 +2892,6 @@ int qemu_add_polling_cb(PollingFunc *func, void *opaque)
{
PollingEntry **ppe, *pe;
pe = qemu_mallocz(sizeof(PollingEntry));
- if (!pe)
- return -1;
pe->func = func;
pe->opaque = opaque;
for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next);
@@ -3273,8 +3261,6 @@ QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
{
QEMUBH *bh;
bh = qemu_mallocz(sizeof(QEMUBH));
- if (!bh)
- return NULL;
bh->cb = cb;
bh->opaque = opaque;
bh->next = first_bh;
@@ -3432,8 +3418,6 @@ VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
VMChangeStateEntry *e;
e = qemu_mallocz(sizeof (*e));
- if (!e)
- return NULL;
e->cb = cb;
e->opaque = opaque;