Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
0528a37
)
removed emallocz
author
Anselm R Garbe <
[email protected]
>
Thu, 22 May 2008 13:10:00 +0000
(14:10 +0100)
committer
Anselm R Garbe <
[email protected]
>
Thu, 22 May 2008 13:10:00 +0000
(14:10 +0100)
dwm.c
diff
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
f46f069
..
483641c
100644
(file)
--- 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 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);
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);
}
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;
void
enternotify(XEvent *e) {
Client *c;
@@
-931,7
+921,8
@@
manage(Window w, XWindowAttributes *wa) {
Window trans;
XWindowChanges wc;
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 */
c->win = w;
/* geometry */