mbox series

[V2,0/4] fix usage of bool

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

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>).

Jafar Abdi (4):
  authz: fix usage of bool in listfile.c
  tests/libqos: fix usage of bool in pci-pc.c
  tests/libqos: fix usage of bool in pci-spapr.c
  hw/tpm: fix usage of bool in tpm-tis.c

 authz/listfile.c         | 2 +-
 hw/tpm/tpm_tis.c         | 4 ++--
 tests/libqos/pci-pc.c    | 2 +-
 tests/libqos/pci-spapr.c | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

Comments

Stefan Hajnoczi March 26, 2019, 8:15 a.m. UTC | #1
On Sat, Mar 23, 2019 at 05:26:33PM +0300, 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>).
> 
> Jafar Abdi (4):
>   authz: fix usage of bool in listfile.c
>   tests/libqos: fix usage of bool in pci-pc.c
>   tests/libqos: fix usage of bool in pci-spapr.c
>   hw/tpm: fix usage of bool in tpm-tis.c
> 
>  authz/listfile.c         | 2 +-
>  hw/tpm/tpm_tis.c         | 4 ++--
>  tests/libqos/pci-pc.c    | 2 +-
>  tests/libqos/pci-spapr.c | 2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> -- 
> 2.7.4
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi March 26, 2019, 8:18 a.m. UTC | #2
On Sat, Mar 23, 2019 at 05:26:33PM +0300, 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>).

CCing qemu-trivial

> Jafar Abdi (4):
>   authz: fix usage of bool in listfile.c
>   tests/libqos: fix usage of bool in pci-pc.c
>   tests/libqos: fix usage of bool in pci-spapr.c
>   hw/tpm: fix usage of bool in tpm-tis.c
> 
>  authz/listfile.c         | 2 +-
>  hw/tpm/tpm_tis.c         | 4 ++--
>  tests/libqos/pci-pc.c    | 2 +-
>  tests/libqos/pci-spapr.c | 2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> -- 
> 2.7.4
>
Daniel P. Berrangé Sept. 6, 2019, 2:36 p.m. UTC | #3
On Tue, Mar 26, 2019 at 08:18:14AM +0000, Stefan Hajnoczi wrote:
> On Sat, Mar 23, 2019 at 05:26:33PM +0300, 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>).
> 
> CCing qemu-trivial

Ping qemu-trivial - this was seems to have been missed, though
patches 2 & 3 got merged via ppc tree meanwhile. The other two
are still valid.


Regards,
Daniel