[PATCH 32/32] [libx11] Cannot reach dead statement "return NULL;"

Erkki Seppälä erkki.seppala at vincit.fi
Wed Jan 26 23:54:15 PST 2011


Removed superfluous check for NULL. name == NULL is already checked
at the function entry.

Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
---
 src/xkb/XKBGAlloc.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/xkb/XKBGAlloc.c b/src/xkb/XKBGAlloc.c
index 17d13be..a1cce94 100644
--- a/src/xkb/XKBGAlloc.c
+++ b/src/xkb/XKBGAlloc.c
@@ -696,8 +696,6 @@ register XkbPropertyPtr prop;
     }
     prop= &geom->properties[geom->num_properties];
     prop->name= (char *)_XkbAlloc(strlen(name)+1);
-    if (!name)
-	return NULL;
     strcpy(prop->name,name);
     prop->value= (char *)_XkbAlloc(strlen(value)+1);
     if (!value) {
-- 
1.7.0.4



More information about the xorg-devel mailing list