mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
avoid extra strlen() call
This commit is contained in:
parent
a1a42253d9
commit
218aa04f79
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user