virbuffer: use g_auto directly for virBuffer

Since commit 44e7f02915
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOCLEAN is just an alias for g_auto. Use the GLib macros
directly instead of our custom aliases.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko
2019-10-16 12:06:43 +02:00
parent 3372c16aa5
commit 2b2c67b401
13 changed files with 147 additions and 147 deletions
+3 -3
View File
@@ -306,8 +306,8 @@ static int testBufAddBuffer(const void *data G_GNUC_UNUSED)
static int
testBufAddBuffer2(const void *opaque G_GNUC_UNUSED)
{
VIR_AUTOCLEAN(virBuffer) buf1 = VIR_BUFFER_INITIALIZER;
VIR_AUTOCLEAN(virBuffer) buf2 = VIR_BUFFER_INITIALIZER;
g_auto(virBuffer) buf1 = VIR_BUFFER_INITIALIZER;
g_auto(virBuffer) buf2 = VIR_BUFFER_INITIALIZER;
/* Intent of this test is to demonstrate a memleak that happen with
* virBufferAddBuffer */
@@ -461,7 +461,7 @@ testBufSetIndent(const void *opaque G_GNUC_UNUSED)
static int
testBufferAutoclean(const void *opaque G_GNUC_UNUSED)
{
VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
virBufferAddLit(&buf, "test test test\n");
return 0;