]> Savannah Git Hosting - gnulib.git/commitdiff
xalloc: Don't use identifier 'nonnull'.
authorBruno Haible <bruno@clisp.org>
Thu, 29 Feb 2024 15:42:00 +0000 (16:42 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 29 Feb 2024 15:42:00 +0000 (16:42 +0100)
* lib/xmalloc.c (check_nonnull): Renamed from nonnull.

ChangeLog
lib/xmalloc.c

index 82263fbd8c40bb7f94f6d9a822b0d026fc87acd4..f4c78b86662712121ac92d82e890ea1cbce189e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-02-29  Bruno Haible  <bruno@clisp.org>
+
+       xalloc: Don't use identifier 'nonnull'.
+       * lib/xmalloc.c (check_nonnull): Renamed from nonnull.
+
 2024-02-29  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Follow gnulib-tool changes, part 35.
index 82e54ef1a5931327e29d37262dee02ba302e9227..5befdab77cfdbb7d4b909ecf96cdd78aa7938680 100644 (file)
@@ -30,7 +30,7 @@
 #include <string.h>
 
 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