Re: [libvirt] [PATCH] conf: eliminate redundat VIR_ALLOC of first element of hosts.

2011-08-11 Thread Laine Stump
On 08/11/2011 02:28 AM, Daniel Veillard wrote: On Thu, Aug 11, 2011 at 12:15:03AM -0400, Laine Stump wrote: virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def->hosts) if def->nhosts was 0. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any

Re: [libvirt] [PATCH] conf: eliminate redundat VIR_ALLOC of first element of hosts.

2011-08-11 Thread Daniel Veillard
On Thu, Aug 11, 2011 at 12:15:03AM -0400, Laine Stump wrote: > virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def->hosts) if > def->nhosts was 0. 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. > --- > src/conf/netwo

[libvirt] [PATCH] conf: eliminate redundat VIR_ALLOC of first element of hosts.

2011-08-10 Thread Laine Stump
virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def->hosts) if def->nhosts was 0. 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. --- src/conf/network_conf.c |8 1 files changed, 0 insertions(+), 8 deletions(