etc/services - sync with NetBSD-8
[minix.git] / external / bsd / flex / dist / lib / realloc.c
blobd7bb6292dcdac66c81f9106e636b53f512fda51f
1 #include <config.h>
3 #include <stdlib.h>
5 #include <errno.h>
7 void * rpl_realloc (void *p, size_t n)
9 void *result;
11 if (n == 0)
13 n = 1;
16 if (p == NULL)
18 result = malloc (n);
20 else
21 result = realloc (p, n);
23 if (result == NULL)
24 errno = ENOMEM;
26 return result;