diff options
author | Yann Gautier <yann.gautier@st.com> | 2023-01-06 14:18:25 +0100 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2023-02-03 17:22:05 +0000 |
commit | 33d7e301f74059b12b606cfc54afd48a9ad26b4a (patch) | |
tree | ec2d7e494182bc8d9695b29e7809f7dd84b028e7 | |
parent | 327f4bb0cf2035ee46f0753429a43fd4c97a5d98 (diff) | |
download | arm-trusted-firmware-33d7e301f74059b12b606cfc54afd48a9ad26b4a.tar.gz |
fix(libc): properly define SCHAR_MIN
SCHAR_MIN definition should use SCHAR_MAX, and not itself.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: If8c1751a381dac50fe3ec5fdf19d6a4918470b58
(cherry picked from commit 06c01b085fb28fcfe26d747da2ba33415dbd52b9)
-rw-r--r-- | include/lib/libc/aarch32/limits_.h | 4 | ||||
-rw-r--r-- | include/lib/libc/aarch64/limits_.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/lib/libc/aarch32/limits_.h b/include/lib/libc/aarch32/limits_.h index 26cec1723..a67ec53e3 100644 --- a/include/lib/libc/aarch32/limits_.h +++ b/include/lib/libc/aarch32/limits_.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #define SCHAR_MAX 0x7F -#define SCHAR_MIN (-SCHAR_MIN - 1) +#define SCHAR_MIN (-SCHAR_MAX - 1) #define CHAR_MAX 0x7F #define CHAR_MIN (-CHAR_MAX - 1) #define UCHAR_MAX 0xFFU diff --git a/include/lib/libc/aarch64/limits_.h b/include/lib/libc/aarch64/limits_.h index e36cfe7dc..1bb0681c4 100644 --- a/include/lib/libc/aarch64/limits_.h +++ b/include/lib/libc/aarch64/limits_.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #define SCHAR_MAX 0x7F -#define SCHAR_MIN (-SCHAR_MIN - 1) +#define SCHAR_MIN (-SCHAR_MAX - 1) #define CHAR_MAX 0x7F #define CHAR_MIN (-CHAR_MAX - 1) #define UCHAR_MAX 0xFFU |