提交 6752a3ec 编写于 作者: M Michal Privoznik

virNetDevOpenvswitchConstructVlans: Use g_auto() for virBuffer

Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 9c58b6eb
......@@ -72,7 +72,7 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const virNetDevVlan *virtV
{
int ret = -1;
size_t i = 0;
virBuffer buf = VIR_BUFFER_INITIALIZER;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
if (!virtVlan || !virtVlan->nTags)
return 0;
......@@ -113,7 +113,6 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const virNetDevVlan *virtV
}
ret = 0;
virBufferFreeAndReset(&buf);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册