mescc: Mes C Library: Prepare for M2-Planet: realloc.
* lib/stdlib/realloc.c (realloc): Prepare for M2-Planet.
This commit is contained in:
parent
dbbc04172c
commit
c94ac66095
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue