From: Paul Eggert Date: Wed, 6 Nov 2024 18:05:23 +0000 (-0800) Subject: Port xsparse.c to AIX X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bbcac1cf79e23c251a1e00cce5023a0cbd8301e;p=thirdparty%2Ftar.git Port xsparse.c to AIX * 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. --- 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; }