Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(parent:
83abfc0
)
using malloc() instead of calloc() and sticking to static initializer and struct...
author
Anselm R Garbe <
[email protected]
>
Mon, 8 Sep 2008 21:24:05 +0000
(22:24 +0100)
committer
Anselm R Garbe <
[email protected]
>
Mon, 8 Sep 2008 21:24:05 +0000
(22:24 +0100)
dwm.c
diff
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
dd39fe1
..
09f3ae1
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-846,12
+846,14
@@
killclient(const Arg *arg) {
void
manage(Window w, XWindowAttributes *wa) {
+ static Client cz;
Client *c, *t = NULL;
Window trans = None;
XWindowChanges wc;
- if(!(c = calloc(1, sizeof(Client))))
- die("fatal: could not calloc() %u bytes\n", sizeof(Client));
+ if(!(c = malloc(sizeof(Client))))
+ die("fatal: could not malloc() %u bytes\n", sizeof(Client));
+ *c = cz;
c->win = w;
/* geometry */