]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/: Rename XCALLOC() => xcalloc_T()
authorAlejandro Colomar <alx@kernel.org>
Sat, 15 Nov 2025 21:12:22 +0000 (22:12 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sat, 6 Dec 2025 03:22:45 +0000 (21:22 -0600)
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 <alx@kernel.org>
lib/alloc/calloc.h
lib/utmp.c

index f11298c0ae225c6e2f6b74f6628c537822600e09..db10a685bb57b4ea0972c27780598c990514eff2 100644 (file)
@@ -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
index 0bff45af1432ad83c6de63ef362f4b39c1edd17e..3c2a51aab528c8432b0fc6b746c9295cd2262326 100644 (file)
@@ -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;