mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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)
|
if (!toadd || !toadd->str)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!buf)
|
if (buf) {
|
||||||
goto cleanup;
|
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);
|
virBufferFreeAndReset(toadd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user