On 02/25/2014 08:46 AM, Laine Stump wrote:
> networkAllocateActualDevice() is called for *all* interfaces, not just
> those with type='network'. In that case, it will jump down to its
> validate: label immediately, without allocating anything. After
> validation is done, two counters are potentially updated (one for the
> network, and one for any particular physical device that is chosen),
> and then networkRunHook() is called.
> 
> This patch refactors that code a slight bit so that networkRunHook()
> doesn't get called if netdef is NULL (i.e. type != network) and to
> place the conditional increment of dev->connections inside the "if
> (netdef)" as well - dev can never be non-null if netdef is null
> (because "dev" is the pointer to a device in a network's pool of
> devices), so this doesn't have any functional effect, it just makes
> the code clearer.
> ---
>  src/network/bridge_driver.c | 47 
> ++++++++++++++++++++++-----------------------
>  1 file changed, 23 insertions(+), 24 deletions(-)

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to