summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-09-08 22:24:05 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-09-08 22:24:05 +0100
commit53cac176928b67db4eb551295291ab09650927eb (patch)
tree79c695612a4255eb24d5448be7a93ec01b510464 /dwm.c
parentapplied XGetWMNormalHints fix (diff)
downloaddwm-53cac176928b67db4eb551295291ab09650927eb.tar.gz
dwm-53cac176928b67db4eb551295291ab09650927eb.zip
using malloc() instead of calloc() and sticking to static initializer and struct assignment, not using *c = (Client){}; right now to avoid some ugly gcc warning, possibly a gcc bug since we are using -std=c99
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index dd39fe1..09f3ae1 100644
--- a/dwm.c
+++ b/dwm.c
@@ -846,12 +846,14 @@ killclient(const Arg *arg) {
846 846
847void 847void
848manage(Window w, XWindowAttributes *wa) { 848manage(Window w, XWindowAttributes *wa) {
849 static Client cz;
849 Client *c, *t = NULL; 850 Client *c, *t = NULL;
850 Window trans = None; 851 Window trans = None;
851 XWindowChanges wc; 852 XWindowChanges wc;
852 853
853 if(!(c = calloc(1, sizeof(Client)))) 854 if(!(c = malloc(sizeof(Client))))
854 die("fatal: could not calloc() %u bytes\n", sizeof(Client)); 855 die("fatal: could not malloc() %u bytes\n", sizeof(Client));
856 *c = cz;
855 c->win = w; 857 c->win = w;
856 858
857 /* geometry */ 859 /* geometry */