Remove unnecessary label and goto.
Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/util/virbuffer.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c
index 8f9cd57e06..a4834174a1 100644
--- a/src/util/virbuffer.c
+++ b/src/util/virbuffer.c
@@ -185,13 +185,11 @@ virBufferAddBuffer(virBuffer *buf, virBuffer *toadd)
if (!toadd || !toadd->str)
return;
- if (!buf)
- goto cleanup;
-
- virBufferInitialize(buf);
- g_string_append_len(buf->str, toadd->str->str, toadd->str->len);
+ if (buf) {
+ virBufferInitialize(buf);
+ g_string_append_len(buf->str, toadd->str->str, toadd->str->len);
+ }
- cleanup:
virBufferFreeAndReset(toadd);
}
--
2.31.1