removed badmalloc (thx for the pointer to Uriel)
authorAnselm R. Garbe <arg@10kloc.org>
Tue, 22 Aug 2006 16:06:11 +0200
changeset 325 58c09c533d3f
parent 324 6b535e908636
child 326 73efaa15a635
removed badmalloc (thx for the pointer to Uriel)
util.c
--- a/util.c	Tue Aug 22 10:06:11 2006 +0200
+++ b/util.c	Tue Aug 22 16:06:11 2006 +0200
@@ -9,14 +9,6 @@
 #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 @@
 {
 	void *res = realloc(ptr, size);
 	if(!res)
-		badmalloc(size);
+		eprint("fatal: could not malloc() %u bytes\n", size);
 	return res;
 }