removed badmalloc (thx for the pointer to Uriel)
Anselm R. Garbe arg@10kloc.org
Tue, 22 Aug 2006 16:06:11 +0200
1 files changed,
2 insertions(+),
10 deletions(-)
jump to
M
util.c
→
util.c
@@ -9,14 +9,6 @@ #include <stdlib.h>
#include <sys/wait.h> #include <unistd.h> -/* static */ - -static void -badmalloc(unsigned int size) -{ - eprint("fatal: could not malloc() %u bytes\n", size); -} - /* extern */ void *@@ -25,7 +17,7 @@ {
void *res = calloc(1, size); if(!res) - badmalloc(size); + eprint("fatal: could not malloc() %u bytes\n", size); return res; }@@ -45,7 +37,7 @@ erealloc(void *ptr, unsigned int size)
{ void *res = realloc(ptr, size); if(!res) - badmalloc(size); + eprint("fatal: could not malloc() %u bytes\n", size); return res; }