tools/llvm: Do not build with symbols
[minix3.git] / external / bsd / flex / dist / lib / realloc.c
blob25ff0db5fb6b994c5df5d9cbfa58b081b3f0e773
1 /* $NetBSD: realloc.c,v 1.1.1.1 2013/04/06 14:05:53 christos Exp $ */
3 #include <config.h>
5 #include <stdlib.h>
7 #include <errno.h>
9 void * rpl_realloc (void *p, size_t n)
11 void *result;
13 if (n == 0)
15 n = 1;
18 if (p == NULL)
20 result = malloc (n);
22 else
23 result = realloc (p, n);
25 if (result == NULL)
26 errno = ENOMEM;
28 return result;