1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

virBufferAddBuffer: Cleanup

Remove unnecessary label and goto.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-11-08 11:34:54 +01:00
parent 6ba7e1b330
commit ddf48de4c8

View File

@ -185,13 +185,11 @@ virBufferAddBuffer(virBuffer *buf, virBuffer *toadd)
if (!toadd || !toadd->str)
return;
if (!buf)
goto cleanup;
if (buf) {
virBufferInitialize(buf);
g_string_append_len(buf->str, toadd->str->str, toadd->str->len);
}
virBufferInitialize(buf);
g_string_append_len(buf->str, toadd->str->str, toadd->str->len);
cleanup:
virBufferFreeAndReset(toadd);
}