[PATCH] virt-aa-helper: fix bool initialization

Jiri Denemark jdenemar at redhat.com
Tue Nov 16 10:27:45 UTC 2021


On Tue, Nov 16, 2021 at 09:18:43 +0100, christian.ehrhardt at canonical.com wrote:
> From: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> 
> Since purged is a bool variable it should be initialized by false
> instead of 0.
> 
> Suggested-by: Sergio Durigan Junior <sergio.durigan at canonical.com>
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> ---
>  src/security/virt-aa-helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
> index 218e07bfb0..898f9f1a16 100644
> --- a/src/security/virt-aa-helper.c
> +++ b/src/security/virt-aa-helper.c
> @@ -1438,7 +1438,7 @@ main(int argc, char **argv)
>      char *profile = NULL;
>      char *include_file = NULL;
>      off_t size;
> -    bool purged = 0;
> +    bool purged = false;
>  
>      if (virGettextInitialize() < 0 ||
>          virErrorInitialize() < 0) {

Reviewed-by: Jiri Denemark <jdenemar at redhat.com>




More information about the libvir-list mailing list