summaryrefslogtreecommitdiffstats
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
parents/int/uint/ in config.h (diff)
downloaddwm-0a9ef560c0b18e95298964a2d482bc64f48b6330.tar.gz
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);
132void drawbar(void); 132void drawbar(void);
133void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]); 133void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]);
134void drawtext(const char *text, ulong col[ColLast], Bool invert); 134void drawtext(const char *text, ulong col[ColLast], Bool invert);
135void *emallocz(uint size);
136void enternotify(XEvent *e); 135void enternotify(XEvent *e);
137void eprint(const char *errstr, ...); 136void eprint(const char *errstr, ...);
138void expose(XEvent *e); 137void expose(XEvent *e);
@@ -596,15 +595,6 @@ drawtext(const char *text, ulong col[ColLast], Bool invert) {
596 XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len); 595 XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
597} 596}
598 597
599void *
600emallocz(uint size) {
601 void *res = calloc(1, size);
602
603 if(!res)
604 eprint("fatal: could not malloc() %u bytes\n", size);
605 return res;
606}
607
608void 598void
609enternotify(XEvent *e) { 599enternotify(XEvent *e) {
610 Client *c; 600 Client *c;
@@ -931,7 +921,8 @@ manage(Window w, XWindowAttributes *wa) {
931 Window trans; 921 Window trans;
932 XWindowChanges wc; 922 XWindowChanges wc;
933 923
934 c = emallocz(sizeof(Client)); 924 if(!(c = calloc(1, sizeof(Client))))
925 eprint("fatal: could not calloc() %u bytes\n", sizeof(Client));
935 c->win = w; 926 c->win = w;
936 927
937 /* geometry */ 928 /* geometry */