blob: 79bfd28ccad1b8d04fcd537d532628f7e06ec2a4 [file] [log] [blame]
#include <config.h>
#undef realloc
#undef malloc
#include <stdlib.h>
#include <errno.h>
void * rpl_realloc (void *p, size_t n)
{
void *result;
if (n == 0)
{
n = 1;
}
if (p == NULL)
{
result = malloc (n);
}
else
result = realloc (p, n);
if (result == NULL)
errno = ENOMEM;
return result;
}