[PATCH 10/10] network: Remove dead code getting, but not using ipdef

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The fetch of 'ipdef' in networkRefreshDhcpDaemon() when the loop to fill
in ipv4def fails to find an ipv4 address with dhcp defined. The filled in
ipdef value was not used.  Code was made unnecessary with commit it 2d5cd1.
---
 src/network/bridge_driver.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 6f3c839..268dada 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1156,9 +1156,6 @@ networkRefreshDhcpDaemon(struct network_driver *driver,
         if (!ipv4def && (ipdef->nranges || ipdef->nhosts))
             ipv4def = ipdef;
     }
-    /* If no IPv4 addresses had dhcp info, pick the first (if there were any). */
-    if (!ipdef)
-        ipdef = virNetworkDefGetIpByIndex(network->def, AF_INET, 0);
 
     ipv6def = NULL;
     for (ii = 0;
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]