1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-10 08:58:16 +03:00

Fixup for buf.c

This commit is contained in:
Daniel Veillard 2012-07-25 16:30:56 +08:00
parent 5756038650
commit 6f6feba876

7
buf.c
View File

@ -1141,11 +1141,12 @@ xmlBufBackToBuffer(xmlBufPtr buf) {
*/
int
xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer) {
int ret;
int ret = 0;
if ((buf == NULL) || (buf->error))
return(0);
if ((buf != NULL) && (buffer->content != NULL) && (buffer->use > 0)) {
ret = -1;
else if ((buffer != NULL) && (buffer->content != NULL) &&
(buffer->use > 0)) {
ret = xmlBufAdd(buf, buffer->content, buffer->use);
}
xmlBufferFree(buffer);