diff mbox series

[V2,1/4] authz: fix usage of bool in listfile.c

Message ID 1553351197-14581-2-git-send-email-cafer.abdi@gmail.com (mailing list archive)
State New, archived
Headers show
Series fix usage of bool | expand

Commit Message

Jafar Abdi March 23, 2019, 2:26 p.m. UTC
Clean up wrong usage of FALSE and TRUE in places that use "bool" from stdbool.h.

FALSE and TRUE (with capital letters) are the constants defined by glib for
being used with the "gboolean" type of glib. But some parts of the code also use
TRUE and FALSE for variables that are declared as "bool" (the type from <stdbool.h>).

Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 authz/listfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth March 24, 2019, 7:37 p.m. UTC | #1
On 23/03/2019 15.26, Jafar Abdi wrote:
> Clean up wrong usage of FALSE and TRUE in places that use "bool" from stdbool.h.
> 
> FALSE and TRUE (with capital letters) are the constants defined by glib for
> being used with the "gboolean" type of glib. But some parts of the code also use
> TRUE and FALSE for variables that are declared as "bool" (the type from <stdbool.h>).
> 
> Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
>  authz/listfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/authz/listfile.c b/authz/listfile.c
> index d457976..03eaf46 100644
> --- a/authz/listfile.c
> +++ b/authz/listfile.c
> @@ -238,7 +238,7 @@ qauthz_list_file_init(Object *obj)
>  
>      authz->file_watch = -1;
>  #ifdef CONFIG_INOTIFY1
> -    authz->refresh = TRUE;
> +    authz->refresh = true;
>  #endif
>  }

Reviewed-by: Thomas Huth <thuth@redhat.com>
Philippe Mathieu-Daudé March 24, 2019, 10:47 p.m. UTC | #2
Le sam. 23 mars 2019 15:27, Jafar Abdi <cafer.abdi@gmail.com> a écrit :

> Clean up wrong usage of FALSE and TRUE in places that use "bool" from
> stdbool.h.
>
> FALSE and TRUE (with capital letters) are the constants defined by glib for
> being used with the "gboolean" type of glib. But some parts of the code
> also use
> TRUE and FALSE for variables that are declared as "bool" (the type from
> <stdbool.h>).
>
> Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

---
>  authz/listfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/authz/listfile.c b/authz/listfile.c
> index d457976..03eaf46 100644
> --- a/authz/listfile.c
> +++ b/authz/listfile.c
> @@ -238,7 +238,7 @@ qauthz_list_file_init(Object *obj)
>
>      authz->file_watch = -1;
>  #ifdef CONFIG_INOTIFY1
> -    authz->refresh = TRUE;
> +    authz->refresh = true;
>  #endif
>  }
>
> --
> 2.7.4
>
>
>
diff mbox series

Patch

diff --git a/authz/listfile.c b/authz/listfile.c
index d457976..03eaf46 100644
--- a/authz/listfile.c
+++ b/authz/listfile.c
@@ -238,7 +238,7 @@  qauthz_list_file_init(Object *obj)
 
     authz->file_watch = -1;
 #ifdef CONFIG_INOTIFY1
-    authz->refresh = TRUE;
+    authz->refresh = true;
 #endif
 }