From: Alejandro Colomar Date: Tue, 14 Oct 2025 10:35:31 +0000 (+0200) Subject: */: s/SIZEOF_ARRAY/sizeof_a/ X-Git-Tag: 4.19.0-rc1~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5c5791fe70655e39b3ac7973423cf8b1d65007c;p=thirdparty%2Fshadow.git */: s/SIZEOF_ARRAY/sizeof_a/ This name better reflects that it handles arrays, and doesn't shout. Signed-off-by: Alejandro Colomar --- diff --git a/lib/sizeof.h b/lib/sizeof.h index a3be1a7c4..5b63efd5f 100644 --- a/lib/sizeof.h +++ b/lib/sizeof.h @@ -23,7 +23,8 @@ # define countof(a) (sizeof(a) / sizeof((a)[0])) #endif -#define SIZEOF_ARRAY(a) (countof(a) * sizeof((a)[0])) +// sizeof_a - sizeof array +#define sizeof_a(a) (countof(a) * sizeof((a)[0])) #define STRLEN(s) (countof("" s "") - 1) diff --git a/lib/string/memset/memzero.h b/lib/string/memset/memzero.h index 7b8693dc4..caa4c0636 100644 --- a/lib/string/memset/memzero.h +++ b/lib/string/memset/memzero.h @@ -16,7 +16,7 @@ #include "sizeof.h" -#define MEMZERO(arr) memzero(arr, SIZEOF_ARRAY(arr)) +#define MEMZERO(arr) memzero(arr, sizeof_a(arr)) inline void *memzero(void *ptr, size_t size);