From cabcfe276c655ece78bec43ce238c2264d7e7823 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Thu, 14 May 2020 10:24:24 +0800 Subject: [PATCH] libpayload: Fix definitions of minimum integer values Fix incorrectly defined constants INT16_MIN, INT32_MIN and INT64_MIN, which recursively call themselves. BRANCH=none BUG=none TEST=emerge-nami libpayload Change-Id: I1fa8402d318393de2e02f1e632ab78b6ec0768e8 Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/41391 Reviewed-by: Paul Menzel Reviewed-by: Angel Pons Reviewed-by: Hung-Te Lin Reviewed-by: Joel Kitching Tested-by: build bot (Jenkins) --- payloads/libpayload/include/stdint.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/payloads/libpayload/include/stdint.h b/payloads/libpayload/include/stdint.h index 1b2b97e7c1..3cb494a7f6 100644 --- a/payloads/libpayload/include/stdint.h +++ b/payloads/libpayload/include/stdint.h @@ -45,9 +45,9 @@ typedef long ptrdiff_t; #define INT64_MAX (9223372036854775807LL) #define INT8_MIN (-INT8_MAX - 1) -#define INT16_MIN (-INT16_MIN - 1) -#define INT32_MIN (-INT32_MIN - 1) -#define INT64_MIN (-INT64_MIN - 1) +#define INT16_MIN (-INT16_MAX - 1) +#define INT32_MIN (-INT32_MAX - 1) +#define INT64_MIN (-INT64_MAX - 1) #define UINT8_MAX (255) #define UINT16_MAX (65535)