From 8e8f34df77c120e181045815ae09400afe100375 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 c66aa69b2..ed603cf19 100644 --- a/include/misc.h +++ b/include/misc.h @@ -204,10 +204,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)); } /**