X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=util.c;fp=util.c;h=2eb9eb2420ccec6ae1b5e2da1649b960e588ee91;hp=99d7bebb773c42658a79032ba566986f54d401dc;hb=6a3ae5e26a5cebfd35f2423aec0c47843b5a85be;hpb=8c334ee078a682a4e5b01aad6b12d24cf9be26d6 diff --git a/util.c b/util.c index 99d7beb..2eb9eb2 100644 --- a/util.c +++ b/util.c @@ -9,14 +9,6 @@ #include #include -/* static */ - -static void -badmalloc(unsigned int size) -{ - eprint("fatal: could not malloc() %u bytes\n", size); -} - /* extern */ void * @@ -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; } @@ -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; }