[PATCH] treewide: Replace TRUE/FALSE with true/false

Ben Dooks ben.dooks at codethink.co.uk
Wed Dec 21 07:05:07 PST 2022


On 21/12/2022 11:38, Bin Meng wrote:
> C language standard uses true/false for the boolean type.
> Let's switch to that for better language compatibility.
> 
> Signed-off-by: Bin Meng <bmeng at tinylab.org>

snip

> diff --git a/include/sbi/sbi_types.h b/include/sbi/sbi_types.h
> index 7fb1af7..75cdddd 100644
> --- a/include/sbi/sbi_types.h
> +++ b/include/sbi/sbi_types.h
> @@ -54,10 +54,8 @@ typedef unsigned long		virtual_size_t;
>   typedef unsigned long		physical_addr_t;
>   typedef unsigned long		physical_size_t;
>   
> -#define TRUE			1
> -#define FALSE			0
> -#define true			TRUE
> -#define false			FALSE
> +#define true			1
> +#define false			0
>   

I assume we can't use the <stdbool.h> ?



-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html




More information about the opensbi mailing list