diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-05-22 14:10:00 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-05-22 14:10:00 +0100 |
| commit | 0a9ef560c0b18e95298964a2d482bc64f48b6330 (patch) | |
| tree | 5b36d63f47632f003234945f572e858d8bb63ef8 | |
| parent | s/int/uint/ in config.h (diff) | |
| download | dwm-0a9ef560c0b18e95298964a2d482bc64f48b6330.tar.gz dwm-0a9ef560c0b18e95298964a2d482bc64f48b6330.zip | |
removed emallocz
| -rw-r--r-- | dwm.c | 13 |
1 files changed, 2 insertions, 11 deletions
| @@ -132,7 +132,6 @@ void detachstack(Client *c); | |||
| 132 | void drawbar(void); | 132 | void drawbar(void); |
| 133 | void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]); | 133 | void drawsquare(Bool filled, Bool empty, Bool invert, ulong col[ColLast]); |
| 134 | void drawtext(const char *text, ulong col[ColLast], Bool invert); | 134 | void drawtext(const char *text, ulong col[ColLast], Bool invert); |
| 135 | void *emallocz(uint size); | ||
| 136 | void enternotify(XEvent *e); | 135 | void enternotify(XEvent *e); |
| 137 | void eprint(const char *errstr, ...); | 136 | void eprint(const char *errstr, ...); |
| 138 | void expose(XEvent *e); | 137 | void 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 | ||
| 599 | void * | ||
| 600 | emallocz(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 | |||
| 608 | void | 598 | void |
| 609 | enternotify(XEvent *e) { | 599 | enternotify(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 */ |
