summaryrefslogtreecommitdiff
path: root/atspi/atspi-device-listener.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@novell.com>2011-05-05 17:14:02 -0500
committerMike Gorse <mgorse@novell.com>2011-05-05 17:14:02 -0500
commit0af92999fa225c8c3a7dd2d55208e96907fd929d (patch)
tree229cf67b9203be96962e9605edb4a3b6a1444b55 /atspi/atspi-device-listener.c
parent025bcc69f7fcede5f04194deae9b0c8f6a55b8ca (diff)
downloadat-spi2-core-0af92999fa225c8c3a7dd2d55208e96907fd929d.tar.gz
Remove some redundant out-of-memory checks
If malloc returns NULL, then g_malloc will call g_error and thus abort, so it is redundant to check the return value of g_new0 and the like, since glib will already have aborted the program rather than returning a NULL value. "Cleaning up" the code by removing some of these checks.
Diffstat (limited to 'atspi/atspi-device-listener.c')
-rw-r--r--atspi/atspi-device-listener.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/atspi/atspi-device-listener.c b/atspi/atspi-device-listener.c
index 669f874f..48ecc45c 100644
--- a/atspi/atspi-device-listener.c
+++ b/atspi/atspi-device-listener.c
@@ -118,8 +118,6 @@ static AtspiDeviceEvent *
atspi_device_event_copy (AtspiDeviceEvent *src)
{
AtspiDeviceEvent *dst = g_new0 (AtspiDeviceEvent, 1);
- if (!dst)
- return NULL;
dst->type = src->type;
dst->id = src->id;
dst->hw_code = src->hw_code;