minimized the memory allocated for GetContent and a bit of cleanup. Daniel
* tree.c: minimized the memory allocated for GetContent
and a bit of cleanup.
Daniel
diff --git a/tree.c b/tree.c
index 4e3f749..2a2c68f 100644
--- a/tree.c
+++ b/tree.c
@@ -4170,7 +4170,7 @@
xmlBufferPtr buffer;
xmlChar *ret;
- buffer = xmlBufferCreate();
+ buffer = xmlBufferCreateSize(64);
if (buffer == NULL)
return (NULL);
while (tmp != NULL) {
@@ -5382,10 +5382,11 @@
*/
int
xmlUnsetProp(xmlNodePtr node, const xmlChar *name) {
- xmlAttrPtr prop = node->properties, prev = NULL;;
+ xmlAttrPtr prop, prev = NULL;;
if ((node == NULL) || (name == NULL))
return(-1);
+ prop = node->properties;
while (prop != NULL) {
if ((xmlStrEqual(prop->name, name)) &&
(prop->ns == NULL)) {