提交 ff06e834 编写于 作者: P Peter Krempa

util: buffer: Use 'cleanup' as label name in virBufferAddBuffer

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 a5217cd7
......@@ -201,22 +201,22 @@ virBufferAddBuffer(virBufferPtr buf, virBufferPtr toadd)
return;
if (!buf)
goto done;
goto cleanup;
if (buf->error || toadd->error) {
if (!buf->error)
virBufferSetError(buf, toadd->error);
goto done;
goto cleanup;
}
if (virBufferGrow(buf, toadd->use) < 0)
goto done;
goto cleanup;
memcpy(&buf->content[buf->use], toadd->content, toadd->use);
buf->use += toadd->use;
buf->content[buf->use] = '\0';
done:
cleanup:
virBufferFreeAndReset(toadd);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册