From 7a9931edd71e493e3a379bb106949609201b3857 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 29 Feb 2024 16:42:00 +0100 Subject: [PATCH] xalloc: Don't use identifier 'nonnull'. * lib/xmalloc.c (check_nonnull): Renamed from nonnull. --- ChangeLog | 5 +++++ lib/xmalloc.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82263fbd8c..f4c78b8666 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-02-29 Bruno Haible + + xalloc: Don't use identifier 'nonnull'. + * lib/xmalloc.c (check_nonnull): Renamed from nonnull. + 2024-02-29 Collin Funk gnulib-tool.py: Follow gnulib-tool changes, part 35. diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 82e54ef1a5..5befdab77c 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -30,7 +30,7 @@ #include static void * _GL_ATTRIBUTE_PURE -nonnull (void *p) +check_nonnull (void *p) { if (!p) xalloc_die (); @@ -42,13 +42,13 @@ nonnull (void *p) void * xmalloc (size_t s) { - return nonnull (malloc (s)); + return check_nonnull (malloc (s)); } void * ximalloc (idx_t s) { - return nonnull (imalloc (s)); + return check_nonnull (imalloc (s)); } char * @@ -72,7 +72,7 @@ xrealloc (void *p, size_t s) void * xirealloc (void *p, idx_t s) { - return nonnull (irealloc (p, s)); + return check_nonnull (irealloc (p, s)); } /* Change the size of an allocated block of memory P to an array of N @@ -90,7 +90,7 @@ xreallocarray (void *p, size_t n, size_t s) void * xireallocarray (void *p, idx_t n, idx_t s) { - return nonnull (ireallocarray (p, n, s)); + return check_nonnull (ireallocarray (p, n, s)); } /* Allocate an array of N objects, each with S bytes of memory, @@ -295,13 +295,13 @@ xizalloc (idx_t s) void * xcalloc (size_t n, size_t s) { - return nonnull (calloc (n, s)); + return check_nonnull (calloc (n, s)); } void * xicalloc (idx_t n, idx_t s) { - return nonnull (icalloc (n, s)); + return check_nonnull (icalloc (n, s)); } /* Clone an object P of size S, with error checking. There's no need -- 2.39.5