From 2bb018526558ab5927f84d61a86b8856a27cfa25 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 7 Aug 2025 19:56:01 +0200 Subject: [PATCH] pad_to_int32 --- include/misc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/misc.h b/include/misc.h index 3c04594ebc..9d66567bdc 100644 --- a/include/misc.h +++ b/include/misc.h @@ -184,10 +184,10 @@ bytes_to_int32(const size_t bytes) * @param bytes The minimum number of bytes needed. * @return The closest multiple of 4 that is equal or higher than bytes. */ -static inline int -pad_to_int32(const int bytes) +static inline size_t +pad_to_int32(const size_t bytes) { - return (((bytes) + 3) & ~3); + return (((bytes) + 3) & ~((size_t)3)); } /**