]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.
authorLaine Stump <laine@laine.org>
Thu, 11 Aug 2011 03:34:07 +0000 (23:34 -0400)
committerLaine Stump <laine@laine.org>
Fri, 9 Mar 2012 09:53:10 +0000 (04:53 -0500)
commitb5893b7b64d5f748ec36e52594328beb9bbef099
treed08bfd543e1c279b789190f8ebd0834341a85978
parentc6daec7b14d96884c13d919989cb369a6065cb44
conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.

virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def->hosts) if
def->hosts was NULL. This is a waste of time, though, since
VIR_REALLOC_N is called a few lines further down, prior to any use of
def->hosts. (initializing def->nhosts to 0 is also redundant, because
the newly allocated memory will always be cleared to all 0's anyway).
src/conf/network_conf.c