Fixup for buf.c
diff --git a/buf.c b/buf.c
index c2123aa..7e293e6 100644
--- a/buf.c
+++ b/buf.c
@@ -1141,11 +1141,12 @@
*/
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);