Re: [PATCH 10/11] Remove use of networkPrivateData from network driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/23/2014 09:14 AM, Daniel P. Berrange wrote:
> The shared network driver is stateful and inside the daemon so
> there is no need to use the networkPrivateData field to get the
> driver handle. Just access the global driver handle directly.
> 
> Many places already directly accessed the global driver handle
> in any case, so the code could never work without relying on
> this.
> ---
>  src/network/bridge_driver.c | 435 ++++++++++++++++++++------------------------
>  1 file changed, 196 insertions(+), 239 deletions(-)
> 

ACK

> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 5f2e778..4c9b098 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -86,37 +86,34 @@
>  
>  VIR_LOG_INIT("network.bridge_driver");
>  
> -static void networkDriverLock(virNetworkDriverStatePtr driver)
> +static virNetworkDriverStatePtr driver = NULL;

The NULL initializer here is not strictly necessary.

> @@ -126,18 +123,16 @@ static int networkUnplugBandwidth(virNetworkObjPtr net,
>  static void networkNetworkObjTaint(virNetworkObjPtr net,
>                                     virNetworkTaintFlags taint);
>  
> -static virNetworkDriverStatePtr driverState = NULL;

Then again, you were just hoisting it earlier.

-- 
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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]