diff -r 7a99ff52436d -r 567490f03d8c dwm.c --- a/dwm.c Thu May 22 14:02:31 2008 +0100 +++ b/dwm.c Thu May 22 14:10:00 2008 +0100 @@ -132,7 +132,6 @@ void drawbar(void); void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]); void drawtext(const char *text, ulong col[ColLast], Bool invert); -void *emallocz(uint size); void enternotify(XEvent *e); void eprint(const char *errstr, ...); void expose(XEvent *e); @@ -596,15 +595,6 @@ XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len); } -void * -emallocz(uint size) { - void *res = calloc(1, size); - - if(!res) - eprint("fatal: could not malloc() %u bytes\n", size); - return res; -} - void enternotify(XEvent *e) { Client *c; @@ -931,7 +921,8 @@ Window trans; XWindowChanges wc; - c = emallocz(sizeof(Client)); + if(!(c = calloc(1, sizeof(Client)))) + eprint("fatal: could not calloc() %u bytes\n", sizeof(Client)); c->win = w; /* geometry */