diff mbox series

[V2,2/4] tests/libqos: fix usage of bool in pci-pc.c

Message ID 1553351197-14581-3-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>
---
 tests/libqos/pci-pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake March 23, 2019, 2:34 p.m. UTC | #1
On 3/23/19 9:26 AM, 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>
> ---
>  tests/libqos/pci-pc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Technically, I only reviewed patch 1 of your v1 series, so adding my R-b
to 2-4 was premature. But now that I've read through all 4 patches of
v2, I'm fine with you keeping it for all of them.

Thanks for resending - it looks a lot better!
Thomas Huth March 24, 2019, 7:39 p.m. UTC | #2
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>
> ---
>  tests/libqos/pci-pc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c
> index 4ab16fa..407d8af 100644
> --- a/tests/libqos/pci-pc.c
> +++ b/tests/libqos/pci-pc.c
> @@ -125,7 +125,7 @@ void qpci_init_pc(QPCIBusPC *qpci, QTestState *qts, QGuestAllocator *alloc)
>      assert(qts);
>  
>      /* tests can use pci-bus */
> -    qpci->bus.has_buggy_msi = FALSE;
> +    qpci->bus.has_buggy_msi = false;
>  
>      qpci->bus.pio_readb = qpci_pc_pio_readb;
>      qpci->bus.pio_readw = qpci_pc_pio_readw;

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c
index 4ab16fa..407d8af 100644
--- a/tests/libqos/pci-pc.c
+++ b/tests/libqos/pci-pc.c
@@ -125,7 +125,7 @@  void qpci_init_pc(QPCIBusPC *qpci, QTestState *qts, QGuestAllocator *alloc)
     assert(qts);
 
     /* tests can use pci-bus */
-    qpci->bus.has_buggy_msi = FALSE;
+    qpci->bus.has_buggy_msi = false;
 
     qpci->bus.pio_readb = qpci_pc_pio_readb;
     qpci->bus.pio_readw = qpci_pc_pio_readw;