mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tools: 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:
@@ -2413,7 +2413,7 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd)
|
||||
}
|
||||
|
||||
for (j = 0; j < iface->naddrs; j++) {
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
switch (iface->addrs[j].type) {
|
||||
case VIR_IP_ADDR_TYPE_IPV4:
|
||||
@@ -2442,7 +2442,6 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd)
|
||||
vshPrint(ctl, " %-10s %-17s %s\n",
|
||||
"-", "-", ip_addr_str);
|
||||
|
||||
virBufferFreeAndReset(&buf);
|
||||
VIR_FREE(ip_addr_str);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user