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

Re: [libvirt] [PATCH 07/10] Turn some dual-state int parameters into booleans



> From: "Daniel P. Berrange" <berrange redhat com>
> 
> The virStateInitialize method and several cgroups methods were
> using an 'int privileged' parameter or similar for dual-state
> values. These are better represented with the bool type.
> 
> Signed-off-by: Daniel P. Berrange <berrange redhat com>
> ---

> +++ b/src/driver.h
> @@ -1487,7 +1487,7 @@ struct _virStorageDriver {
>  };
>  
>  # ifdef WITH_LIBVIRTD
> -typedef int (*virDrvStateInitialize) (int privileged);
> +typedef int (*virDrvStateInitialize) (bool privileged);

ACK.

> +++ b/src/remote/remote_driver.c
> @@ -68,7 +68,7 @@
>  # define HYPER_TO_ULONG(_to, _from) (_to) = (_from)
>  #endif
>  
> -static int inside_daemon = 0;
> +static bool inside_daemon = false;

Another case of non-necessary static initialization to 0.


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