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.
This commit is contained in:
Paul Eggert
2024-11-06 10:05:23 -08:00
parent ac06d4d104
commit 9bbcac1cf7

View File

@@ -65,7 +65,7 @@ static void *
emalloc (size_t size) emalloc (size_t size)
{ {
char *p = malloc (size); char *p = malloc (size);
if (!p) if (!p && size)
die (1, "not enough memory"); die (1, "not enough memory");
return p; return p;
} }