Commit 0aa9f3c0 authored by Alexei Fedorov's avatar Alexei Fedorov
Browse files

TF-A: Redefine true/false definitions



This patch redefines 'true' and 'false' definitions in
'include/lib/libc/stdbool.h' to fix defect reported by
MISRA C-2012 Rule 10.1
"The expression \"0\" of non-boolean essential type is
being interpreted as a boolean value for the operator \"? :\"."

Change-Id: Ie1b16e5826e5427cc272bd753e15d4d283e1ee4c
Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
parent 8d5db315
/* /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#define bool _Bool #define bool _Bool
#define true 1 #define true (0 < 1)
#define false 0 #define false (0 > 1)
#define __bool_true_false_are_defined 1 #define __bool_true_false_are_defined 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment