networkGetDHCPLeases: Don't assign @ipdef_tmp twice

When rewriting the function, I've mistakenly declared a variable
and assigned it to itself. Let's initialize the variable properly.

Fixes: 5fb6d98c88
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2021-01-05 12:54:40 +01:00
parent 03be543f6b
commit b304207f58

View 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)) {