]> xenbits.xensource.com Git - libvirt.git/commitdiff
network: Remove dead code getting, but not using ipdef
authorJohn Ferlan <jferlan@redhat.com>
Thu, 17 Jan 2013 19:17:15 +0000 (14:17 -0500)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 17 Jan 2013 22:46:36 +0000 (23:46 +0100)
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

index 6f3c839bafe2af29bc0da58b6fee8f53cae90d7b..268dada5afa38b973a4a27198b4d253be9d16efe 100644 (file)
@@ -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;