Introduction
Introduction Statistics Contact Development Disclaimer Help
tusing malloc() instead of calloc() and sticking to static initializer and stru…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 53cac176928b67db4eb551295291ab09650927eb
parent 83abfc05eb5a1e6ee762ce2921d9d5270e40c9ee
Author: Anselm R Garbe <[email protected]>
Date: Mon, 8 Sep 2008 22:24:05 +0100
using malloc() instead of calloc() and sticking to static initializer and struc…
Diffstat:
M dwm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/dwm.c b/dwm.c
t@@ -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 */
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.