diff options
author | Laine Stump <laine@redhat.com> | 2020-07-02 19:35:41 -0400 |
---|---|---|
committer | Laine Stump <laine@redhat.com> | 2020-07-08 16:34:09 -0400 |
commit | 25c23b95b689e939ab95f828c8ac0dfea9454f76 (patch) | |
tree | 7123eaa2d92bf37aba929e366e0a73d08c28542e /tests/virnetdevbandwidthtest.c | |
parent | b8b58e22b9042025b5871d26a84377aebbadd284 (diff) | |
download | libvirt-25c23b95b689e939ab95f828c8ac0dfea9454f76.tar.gz |
tests: use g_auto for all virBuffers
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'tests/virnetdevbandwidthtest.c')
-rw-r--r-- | tests/virnetdevbandwidthtest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 8039fedbc4..5cbdd6ffea 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -70,7 +70,7 @@ testVirNetDevBandwidthSet(const void *data) const struct testSetStruct *info = data; const char *iface = info->iface; virNetDevBandwidthPtr band = NULL; - virBuffer buf = VIR_BUFFER_INITIALIZER; + g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; char *actual_cmd = NULL; PARSE(info->band, band); @@ -99,7 +99,6 @@ testVirNetDevBandwidthSet(const void *data) cleanup: virCommandSetDryRun(NULL, NULL, NULL); virNetDevBandwidthFree(band); - virBufferFreeAndReset(&buf); VIR_FREE(actual_cmd); return ret; } |