From 9bbcac1cf79e23c251a1e00cce5023a0cbd8301e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 6 Nov 2024 10:05:23 -0800 Subject: [PATCH] Port xsparse.c to AIX MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * scripts/xsparse.c (emalloc): Do not report failure when malloc (0) returns NULL, as it does on AIX. Simply return a null pointer; that’s good enough for xsparse.c. --- scripts/xsparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/xsparse.c b/scripts/xsparse.c index 8559d105..4632e9ea 100644 --- a/scripts/xsparse.c +++ b/scripts/xsparse.c @@ -65,7 +65,7 @@ static void * emalloc (size_t size) { char *p = malloc (size); - if (!p) + if (!p && size) die (1, "not enough memory"); return p; } -- 2.47.3