From 7d31dd6494c1716b77ab6069e75e0b0883978347 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Thu, 17 Jan 2013 14:17:15 -0500 Subject: [PATCH] network: Remove dead code getting, but not using ipdef 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 6f3c839baf..268dada5af 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; -- GitLab