mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
tests: use g_auto for all virBuffers
Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
+1
-2
@@ -390,7 +390,7 @@ static int test9(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
const char* const args[] = { "arg1", "arg2", NULL };
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
virCommandAddArg(cmd, "-version");
|
||||
virCommandAddArgPair(cmd, "-log", "bar.log");
|
||||
@@ -402,7 +402,6 @@ static int test9(const void *unused G_GNUC_UNUSED)
|
||||
|
||||
if (virBufferUse(&buf)) {
|
||||
printf("Buffer not transferred\n");
|
||||
virBufferFreeAndReset(&buf);
|
||||
virCommandFree(cmd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user