diff options
Diffstat (limited to 'lib/xmalloc.c')
-rw-r--r-- | lib/xmalloc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 289cbd0..5befdab 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -1,6 +1,6 @@ /* xmalloc.c -- malloc with out of memory checking - Copyright (C) 1990-2000, 2002-2006, 2008-2023 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2002-2006, 2008-2024 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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 |