[libvirt] [PATCH 11/11] Remove use of networkPrivateData from netcf driver

Eric Blake eblake at redhat.com
Tue Oct 28 16:14:21 UTC 2014


On 10/23/2014 09:14 AM, Daniel P. Berrange wrote:
> The shared netcf 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.
> ---
>  src/interface/interface_backend_netcf.c | 71 +++++++++++----------------------
>  1 file changed, 23 insertions(+), 48 deletions(-)

ACK.

> 
> diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c
> index c55a080..3d01b08 100644
> --- a/src/interface/interface_backend_netcf.c
> +++ b/src/interface/interface_backend_netcf.c
> @@ -63,16 +63,16 @@ virNetcfDriverStateOnceInit(void)
>  
>  VIR_ONCE_GLOBAL_INIT(virNetcfDriverState)
>  
> -static virNetcfDriverStatePtr driverState = NULL;
> +static virNetcfDriverStatePtr driver = NULL;
>  
>  
>  static void
>  virNetcfDriverStateDispose(void *obj)
>  {
> -    virNetcfDriverStatePtr driver = obj;
> +    virNetcfDriverStatePtr _driver = obj;

Annoying that you had to use a name with leading underscore, but this
usage is safe.

-- 
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/e4c73d4c/attachment-0001.sig>


More information about the libvir-list mailing list