[libxml2] Avoid some dead code and cleanup in relaxng.c



commit 7d4e259fbfa24ef2c07a66f4b3d7ad311e68de1b
Author: Gaurav <g gupta samsung com>
Date:   Mon Sep 30 11:27:41 2013 +0800

    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 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/relaxng.c b/relaxng.c
index 370e314..bfaceb7 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]