aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-22 14:10:00 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-22 14:10:00 +0100
commit0a9ef560c0b18e95298964a2d482bc64f48b6330 (patch)
tree5b36d63f47632f003234945f572e858d8bb63ef8 /dwm.c
parent0528a37c791aa8d7b6a5fb8e712a9ce4dfb1cd12 (diff)
downloaddwm-0a9ef560c0b18e95298964a2d482bc64f48b6330.tar.gz
dwm-0a9ef560c0b18e95298964a2d482bc64f48b6330.tar.bz2
dwm-0a9ef560c0b18e95298964a2d482bc64f48b6330.zip
removed emallocz
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/dwm.c b/dwm.c
index f46f069..483641c 100644
--- a/dwm.c
+++ b/dwm.c
@@ -132,7 +132,6 @@ void detachstack(Client *c);
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 @@ drawtext(const char *text, ulong col[ColLast], Bool invert) {
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 @@ manage(Window w, XWindowAttributes *wa) {
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 */