summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-08-06 13:27:46 +0000
committerAntony Dovgal <tony2001@php.net>2006-08-06 13:27:46 +0000
commit218aa04f793e9f572ad7e2216dbacbca7e1356db (patch)
tree583128c27eb1eabaaf0107dd22a5a5fd2a34f184
parenta1a42253d9834c8228b4ada1a3c85de4be086c6d (diff)
downloadphp-git-218aa04f793e9f572ad7e2216dbacbca7e1356db.tar.gz
avoid extra strlen() call
-rw-r--r--ext/simplexml/simplexml.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 832cd53544..22757412ca 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1229,10 +1229,11 @@ SXE_METHOD(asXML)
xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 1, ((xmlDocPtr) sxe->document->ptr)->encoding);
xmlOutputBufferFlush(outbuf);
strval = xmlStrndup(outbuf->buffer->content, outbuf->buffer->use);
+ strval_len = outbuf->buffer->use;
xmlOutputBufferClose(outbuf);
}
- RETVAL_STRINGL(strval, strlen(strval), 1);
+ RETVAL_STRINGL(strval, strval_len, 1);
xmlFree(strval);
} else {
RETVAL_FALSE;