scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

xrealloc.c (216B)


      1 static char sccsid[] = "@(#) ./lib/scc/xrealloc.c";
      2 #include <stdlib.h>
      3 #include <scc/scc.h>
      4 
      5 void *
      6 xrealloc(void *buff, size_t size)
      7 {
      8 	void *p = realloc(buff, size);
      9 
     10 	if (!p)
     11 		die("out of memory");
     12 	return p;
     13 }