tremoved badmalloc (thx for the pointer to Uriel) - dwm - [fork] customized build of dwm, the dynamic window manager
(HTM) git clone git://src.adamsgaard.dk/dwm
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 6a3ae5e26a5cebfd35f2423aec0c47843b5a85be
(DIR) parent 8c334ee078a682a4e5b01aad6b12d24cf9be26d6
(HTM) Author: Anselm R. Garbe <arg@10kloc.org>
Date: Tue, 22 Aug 2006 16:06:11 +0200
removed badmalloc (thx for the pointer to Uriel)
Diffstat:
M util.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
---
(DIR) diff --git a/util.c b/util.c
t@@ -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 *
t@@ -25,7 +17,7 @@ emallocz(unsigned int size)
void *res = calloc(1, size);
if(!res)
- badmalloc(size);
+ eprint("fatal: could not malloc() %u bytes\n", size);
return res;
}
t@@ -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;
}