mescc: Mes C Library: Prepare for M2-Planet: realloc.

* lib/stdlib/realloc.c (realloc): Prepare for M2-Planet.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-07-25 19:56:16 +02:00
parent dbbc04172c
commit c94ac66095
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -25,7 +25,7 @@ void *
realloc (void *ptr, size_t size) realloc (void *ptr, size_t size)
{ {
void *new = malloc (size); void *new = malloc (size);
if (ptr && new) if (ptr != 0 && new != 0)
{ {
memcpy (new, ptr, size); memcpy (new, ptr, size);
free (ptr); free (ptr);