From: Alejandro Colomar Date: Wed, 18 Jan 2023 11:40:01 +0000 (+0100) Subject: Use WIDTHOF() instead of its expansion X-Git-Tag: 4.14.0-rc1~209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=217b054cf53ed71169621d297acc79b42e4abccd;p=thirdparty%2Fshadow.git Use WIDTHOF() instead of its expansion Signed-off-by: Alejandro Colomar --- diff --git a/libmisc/idmapping.c b/libmisc/idmapping.c index 64985f82c..57e9ab229 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)