[libxml2] Fix a const warning in xmlNodeSetBase



commit f370310542e8e9da66f4fb81f42f31645867b20c
Author: Martin Trappel <0xCDCDCDCD gmx at>
Date:   Fri Jan 22 12:08:00 2010 +0100

    Fix a const warning in xmlNodeSetBase
    
    * tree.c: xmlNodeSetName: Remove const from declaration since it is
      used non-const anyway. Remove unnecessary cast on xmlFree later on.

 tree.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tree.c b/tree.c
index ffebf06..3b66f97 100644
--- a/tree.c
+++ b/tree.c
@@ -5056,7 +5056,7 @@ xmlNodeSetName(xmlNodePtr cur, const xmlChar *name) {
 void
 xmlNodeSetBase(xmlNodePtr cur, const xmlChar* uri) {
     xmlNsPtr ns;
-    const xmlChar* fixed;
+    xmlChar* fixed;
 
     if (cur == NULL) return;
     switch(cur->type) {
@@ -5103,7 +5103,7 @@ xmlNodeSetBase(xmlNodePtr cur, const xmlChar* uri) {
     fixed = xmlPathToURI(uri);
     if (fixed != NULL) {
 	xmlSetNsProp(cur, ns, BAD_CAST "base", fixed);
-	xmlFree((xmlChar *)fixed);
+	xmlFree(fixed);
     } else {
 	xmlSetNsProp(cur, ns, BAD_CAST "base", uri);
     }



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