mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
qemu: agent: reduce scope of addrs_count
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
b5c281e81b
commit
269af9f692
@ -2125,7 +2125,6 @@ qemuAgentGetInterfaces(qemuAgentPtr agent,
|
|||||||
virJSONValuePtr reply = NULL;
|
virJSONValuePtr reply = NULL;
|
||||||
virJSONValuePtr ret_array = NULL;
|
virJSONValuePtr ret_array = NULL;
|
||||||
size_t ifaces_count = 0;
|
size_t ifaces_count = 0;
|
||||||
size_t addrs_count = 0;
|
|
||||||
virDomainInterfacePtr *ifaces_ret = NULL;
|
virDomainInterfacePtr *ifaces_ret = NULL;
|
||||||
virHashTablePtr ifaces_store = NULL;
|
virHashTablePtr ifaces_store = NULL;
|
||||||
char **ifname = NULL;
|
char **ifname = NULL;
|
||||||
@ -2159,6 +2158,7 @@ qemuAgentGetInterfaces(qemuAgentPtr agent,
|
|||||||
virJSONValuePtr ip_addr_arr = NULL;
|
virJSONValuePtr ip_addr_arr = NULL;
|
||||||
const char *hwaddr, *ifname_s, *name = NULL;
|
const char *hwaddr, *ifname_s, *name = NULL;
|
||||||
virDomainInterfacePtr iface = NULL;
|
virDomainInterfacePtr iface = NULL;
|
||||||
|
size_t addrs_count = 0;
|
||||||
|
|
||||||
/* interface name is required to be presented */
|
/* interface name is required to be presented */
|
||||||
name = virJSONValueObjectGetString(tmp_iface, "name");
|
name = virJSONValueObjectGetString(tmp_iface, "name");
|
||||||
|
Loading…
Reference in New Issue
Block a user