From 7d4e259fbfa24ef2c07a66f4b3d7ad311e68de1b Mon Sep 17 00:00:00 2001 From: Gaurav Date: Mon, 30 Sep 2013 11:27:41 +0800 Subject: Avoid some dead code and cleanup in relaxng.c https://bugzilla.gnome.org/show_bug.cgi?id=705388 Code needed a bit of cleanup --- relaxng.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/relaxng.c b/relaxng.c index 370e314c..bfaceb7b 100644 --- a/relaxng.c +++ b/relaxng.c @@ -2595,13 +2595,10 @@ xmlRelaxNGSchemaTypeCompare(void *data ATTRIBUTE_UNUSED, } ret = xmlSchemaValPredefTypeNode(typ, value2, &res2, ctxt2); if (ret != 0) { - if ((comp1 == NULL) && (res1 != NULL)) + if (res1 != (xmlSchemaValPtr) comp1) xmlSchemaFreeValue(res1); return (-1); } - if (res1 == NULL) { - return (-1); - } ret = xmlSchemaCompareValues(res1, res2); if (res1 != (xmlSchemaValPtr) comp1) xmlSchemaFreeValue(res1); -- cgit v1.2.3