[libvirt] [PATCH 10/11] Remove use of networkPrivateData from network driver
Eric Blake
eblake at redhat.com
Tue Oct 28 16:09:32 UTC 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141028/e35ecba7/attachment-0001.sig>
More information about the libvir-list
mailing list