diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-05-11 18:59:05 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-05-11 18:59:05 +0100 |
commit | 172af31d56bad27a570c3f4e2bd1e82083afa0b0 (patch) | |
tree | 5032fc0e78c0df753f9ef5c8c2cc47affc60b935 /tools/libxl/libxl_event.c | |
parent | 254a9c4a28e9d35426bb098a2d52c035b8f1e416 (diff) | |
download | xen-172af31d56bad27a570c3f4e2bd1e82083afa0b0.tar.gz xen-172af31d56bad27a570c3f4e2bd1e82083afa0b0.tar.bz2 xen-172af31d56bad27a570c3f4e2bd1e82083afa0b0.zip |
libxl: remove malloc failure handling from NEW_EVENT
Change to use libxl__zalloc, where allocation failure is fatal.
Also remove a spurious semicolon from the helper macro.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_event.c')
-rw-r--r-- | tools/libxl/libxl_event.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index 460ef66b6f..63719b2b5d 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -989,13 +989,7 @@ libxl_event *libxl__event_new(libxl__egc *egc, { libxl_event *ev; - ev = malloc(sizeof(*ev)); - if (!ev) { - LIBXL__EVENT_DISASTER(egc, "allocate new event", errno, type); - return NULL; - } - - memset(ev, 0, sizeof(*ev)); + ev = libxl__zalloc(0,sizeof(*ev)); ev->type = type; ev->domid = domid; |