diff options
author | Mike Gorse <mgorse@novell.com> | 2011-05-05 17:14:02 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@novell.com> | 2011-05-05 17:14:02 -0500 |
commit | 0af92999fa225c8c3a7dd2d55208e96907fd929d (patch) | |
tree | 229cf67b9203be96962e9605edb4a3b6a1444b55 /atspi/atspi-registry.c | |
parent | 025bcc69f7fcede5f04194deae9b0c8f6a55b8ca (diff) | |
download | at-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-registry.c')
-rw-r--r-- | atspi/atspi-registry.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/atspi/atspi-registry.c b/atspi/atspi-registry.c index 20455419..9856be3d 100644 --- a/atspi/atspi-registry.c +++ b/atspi/atspi-registry.c @@ -361,8 +361,6 @@ atspi_key_definition_copy (AtspiKeyDefinition *src) AtspiKeyDefinition *dst; dst = g_new0 (AtspiKeyDefinition, 1); - if (!dst) - return NULL; dst->keycode = src->keycode; dst->keysym = src->keysym; if (src->keystring) |