From 217b054cf53ed71169621d297acc79b42e4abccd Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 18 Jan 2023 12:40:01 +0100 Subject: [PATCH] Use WIDTHOF() instead of its expansion Signed-off-by: Alejandro Colomar --- libmisc/idmapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmisc/idmapping.c b/libmisc/idmapping.c index 64985f82..57e9ab22 100644 --- a/libmisc/idmapping.c +++ b/libmisc/idmapping.c @@ -99,7 +99,7 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv) * 8bytes --> 21 ascii estimated -> 18446744073709551616 (20 real) * 16bytes --> 39 ascii estimated -> 340282366920938463463374607431768211456 (39 real) */ -#define ULONG_DIGITS ((((sizeof(unsigned long) * CHAR_BIT) + 9)/10)*3) +#define ULONG_DIGITS (((WIDTHOF(unsigned long) + 9)/10)*3) #if HAVE_SYS_CAPABILITY_H static inline bool maps_lower_root(int cap, int ranges, const struct map_range *mappings)