From: Alejandro Colomar Date: Sat, 15 Nov 2025 21:12:22 +0000 (+0100) Subject: lib/: Rename XCALLOC() => xcalloc_T() X-Git-Tag: 4.19.0-rc1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3c217ec9e60dc326cf6129bbea1ac07a97aeeba;p=thirdparty%2Fshadow.git lib/: Rename XCALLOC() => xcalloc_T() The 'T' in the name notes that this API is a type-safe variant of the API it wraps. This makes the names more explicative. Signed-off-by: Alejandro Colomar --- diff --git a/lib/alloc/calloc.h b/lib/alloc/calloc.h index f11298c0..db10a685 100644 --- a/lib/alloc/calloc.h +++ b/lib/alloc/calloc.h @@ -22,7 +22,8 @@ }) -#define XCALLOC(n, T) exit_if_null(calloc_T(n, T)) +// xcalloc_T - exit-on-error calloc type-safe +#define xcalloc_T(n, T) exit_if_null(calloc_T(n, T)) #endif // include guard diff --git a/lib/utmp.c b/lib/utmp.c index 0bff45af..3c2a51aa 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -284,7 +284,7 @@ prepare_utmp(const char *name, const char *line, const char *host, line = strprefix(line, "/dev/") ?: line; - utent = XCALLOC(1, struct utmpx); + utent = xcalloc_T(1, struct utmpx); utent->ut_type = USER_PROCESS;