diff mbox series

[kvm-unit-tests,1/3] libcflat: use stdbool

Message ID 20190628203019.3220-2-nadav.amit@gmail.com (mailing list archive)
State New, archived
Headers show
Series x86: Running tests on bare-metal | expand

Commit Message

Nadav Amit June 28, 2019, 8:30 p.m. UTC
To avoid any future build errors, using stdbool instead of defining
bool.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
 lib/libcflat.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Paolo Bonzini July 2, 2019, 4:08 p.m. UTC | #1
On 28/06/19 22:30, Nadav Amit wrote:
> To avoid any future build errors, using stdbool instead of defining
> bool.
> 
> Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
> ---
>  lib/libcflat.h | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/lib/libcflat.h b/lib/libcflat.h
> index 7529958..b94d0ac 100644
> --- a/lib/libcflat.h
> +++ b/lib/libcflat.h
> @@ -24,6 +24,7 @@
>  #include <stddef.h>
>  #include <stdint.h>
>  #include <string.h>
> +#include <stdbool.h>
>  
>  #define __unused __attribute__((__unused__))
>  
> @@ -53,10 +54,6 @@ typedef uint64_t	u64;
>  typedef int64_t		s64;
>  typedef unsigned long	ulong;
>  
> -typedef _Bool		bool;
> -#define false 0
> -#define true  1
> -
>  #if __SIZEOF_LONG__ == 8
>  #  define __PRI32_PREFIX
>  #  define __PRI64_PREFIX	"l"
> 

Queued this one.

Paolo
diff mbox series

Patch

diff --git a/lib/libcflat.h b/lib/libcflat.h
index 7529958..b94d0ac 100644
--- a/lib/libcflat.h
+++ b/lib/libcflat.h
@@ -24,6 +24,7 @@ 
 #include <stddef.h>
 #include <stdint.h>
 #include <string.h>
+#include <stdbool.h>
 
 #define __unused __attribute__((__unused__))
 
@@ -53,10 +54,6 @@  typedef uint64_t	u64;
 typedef int64_t		s64;
 typedef unsigned long	ulong;
 
-typedef _Bool		bool;
-#define false 0
-#define true  1
-
 #if __SIZEOF_LONG__ == 8
 #  define __PRI32_PREFIX
 #  define __PRI64_PREFIX	"l"