mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
virNetDevOpenvswitchConstructVlans: Use g_auto() for virBuffer
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9c58b6eb00
commit
6752a3ec7a
@ -72,7 +72,7 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const virNetDevVlan *virtV
|
|||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||||
|
|
||||||
if (!virtVlan || !virtVlan->nTags)
|
if (!virtVlan || !virtVlan->nTags)
|
||||||
return 0;
|
return 0;
|
||||||
@ -113,7 +113,6 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const virNetDevVlan *virtV
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
virBufferFreeAndReset(&buf);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user