From 1eb02f7fda0ccc5a132350ccb131bb6130d1b63c Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 4 Nov 2022 22:50:16 +0100 Subject: [PATCH] core/macros: fix SIGNOF() macro with size_t --- core/include/macros/math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/include/macros/math.h b/core/include/macros/math.h index 9e4e84a1ba..2ef269935b 100644 --- a/core/include/macros/math.h +++ b/core/include/macros/math.h @@ -31,7 +31,7 @@ extern "C" { unsigned int: 1, \ unsigned long: 1, \ unsigned long long: 1, \ - default: (long long)(a) < 0 ? -1 : 1) + default: ((a) > 0LL) ? 1 : -1) /** * @brief Calculates @p a/ @p b with arithmetic rounding */