]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
networkGetDHCPLeases: Don't assign @ipdef_tmp twice
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 5 Jan 2021 11:54:40 +0000 (12:54 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 5 Jan 2021 11:54:40 +0000 (12:54 +0100)
When rewriting the function, I've mistakenly declared a variable
and assigned it to itself. Let's initialize the variable properly.

Fixes: 5fb6d98c881c42ab41ca72060217b846949a438f
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/network/bridge_driver.c

index 22d7d330a395e66601a9112da6f380d9278408fd..a7c5aade14a073c19c1a7f747a74455b0631b597 100644 (file)
@@ -4155,7 +4155,7 @@ networkGetDHCPLeases(virNetworkPtr net,
 
             /* Obtain prefix */
             for (j = 0; j < def->nips; j++) {
-                virNetworkIPDefPtr ipdef_tmp = ipdef_tmp = &def->ips[j];
+                virNetworkIPDefPtr ipdef_tmp = &def->ips[j];
 
                 if (ipv6 && VIR_SOCKET_ADDR_IS_FAMILY(&ipdef_tmp->address,
                                                       AF_INET6)) {