[libvirt PATCHv2 04/16] qemu: agent: reduce scope of addrs_count

Ján Tomko jtomko at redhat.com
Wed Oct 7 12:35:25 UTC 2020


Signed-off-by: Ján Tomko <jtomko at redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma at redhat.com>
---
 src/qemu/qemu_agent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 51c597f57e..c6878c8590 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -2125,7 +2125,6 @@ qemuAgentGetInterfaces(qemuAgentPtr agent,
     virJSONValuePtr reply = NULL;
     virJSONValuePtr ret_array = NULL;
     size_t ifaces_count = 0;
-    size_t addrs_count = 0;
     virDomainInterfacePtr *ifaces_ret = NULL;
     virHashTablePtr ifaces_store = NULL;
     char **ifname = NULL;
@@ -2159,6 +2158,7 @@ qemuAgentGetInterfaces(qemuAgentPtr agent,
         virJSONValuePtr ip_addr_arr = NULL;
         const char *hwaddr, *ifname_s, *name = NULL;
         virDomainInterfacePtr iface = NULL;
+        size_t addrs_count = 0;
 
         /* interface name is required to be presented */
         name = virJSONValueObjectGetString(tmp_iface, "name");
-- 
2.26.2




More information about the libvir-list mailing list