From 5eb98748a8f249707dc494f1edb7b31fc79240bc Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 16 Apr 2026 17:21:53 -0300 Subject: [PATCH] util: fix bad type casts on min/max --- kernel-src/include/util.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/kernel-src/include/util.h b/kernel-src/include/util.h index dd9b3b73..acc4485b 100644 --- a/kernel-src/include/util.h +++ b/kernel-src/include/util.h @@ -23,13 +23,8 @@ static inline unsigned long log2(unsigned long x) { return sizeof(unsigned long) * 8 - __builtin_clzll(x) - 1; } -static inline long min(long x, long y) { - return x > y ? y : x; -} - -static inline long max(long x, long y) { - return x < y ? y : x; -} +#define min(x, y) (x > y ? y : x) +#define max(x, y) (x < y ? y : x) #define FNV1PRIME 0x100000001b3ull #define FNV1OFFSET 0xcbf29ce484222325ull