summaryrefslogtreecommitdiff
path: root/tree.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2009-09-07 14:58:47 +0200
committerDaniel Veillard <veillard@redhat.com>2009-09-07 14:58:47 +0200
commit594e5dfb48ee6fbac1b64155839063648022fc57 (patch)
treed3f84693bbc34a21be25753438f902eaf51b851d /tree.c
parentd44b9364991bd0067d50c29bdff48305dfdad4ce (diff)
downloadlibxml2-594e5dfb48ee6fbac1b64155839063648022fc57.tar.gz
Chasing dead assignments reported by clang-scan
* SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tree.c b/tree.c
index edca54ef..ffebf064 100644
--- a/tree.c
+++ b/tree.c
@@ -1421,9 +1421,9 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
node = xmlNewDocTextLen(doc, q, cur - q);
if (node == NULL) return(ret);
if (last == NULL) {
- last = ret = node;
+ ret = node;
} else {
- last = xmlAddNextSibling(last, node);
+ xmlAddNextSibling(last, node);
}
}
}
@@ -1590,8 +1590,6 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
last = xmlAddNextSibling(last, node);
}
}
-
- charval = 0;
}
} else
cur++;