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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user