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

Bin Meng bmeng at tinylab.org
Wed Dec 21 07:31:44 PST 2022


On 2022/12/21 23:05:07, "Ben Dooks" <ben.dooks at codethink.co.uk> wrote:

>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> ?
>

Yes, as we are using -nostdinc and -nostdlib.

Regards,
Bin



More information about the opensbi mailing list