mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +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:
parent
6ba7e1b330
commit
ddf48de4c8
@ -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);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
virBufferFreeAndReset(toadd);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user