aewl

changeset 325:58c09c533d3f

removed badmalloc (thx for the pointer to Uriel)
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 22 Aug 2006 16:06:11 +0200
parents 6b535e908636
children 73efaa15a635
files util.c
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line diff
     1.1 --- a/util.c	Tue Aug 22 10:06:11 2006 +0200
     1.2 +++ b/util.c	Tue Aug 22 16:06:11 2006 +0200
     1.3 @@ -9,14 +9,6 @@
     1.4  #include <sys/wait.h>
     1.5  #include <unistd.h>
     1.6  
     1.7 -/* static */
     1.8 -
     1.9 -static void
    1.10 -badmalloc(unsigned int size)
    1.11 -{
    1.12 -	eprint("fatal: could not malloc() %u bytes\n", size);
    1.13 -}
    1.14 -
    1.15  /* extern */
    1.16  
    1.17  void *
    1.18 @@ -25,7 +17,7 @@
    1.19  	void *res = calloc(1, size);
    1.20  
    1.21  	if(!res)
    1.22 -		badmalloc(size);
    1.23 +		eprint("fatal: could not malloc() %u bytes\n", size);
    1.24  	return res;
    1.25  }
    1.26  
    1.27 @@ -45,7 +37,7 @@
    1.28  {
    1.29  	void *res = realloc(ptr, size);
    1.30  	if(!res)
    1.31 -		badmalloc(size);
    1.32 +		eprint("fatal: could not malloc() %u bytes\n", size);
    1.33  	return res;
    1.34  }
    1.35