diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-09-08 22:24:05 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-09-08 22:24:05 +0100 |
| commit | 53cac176928b67db4eb551295291ab09650927eb (patch) | |
| tree | 79c695612a4255eb24d5448be7a93ec01b510464 | |
| parent | applied XGetWMNormalHints fix (diff) | |
| download | dwm-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
| -rw-r--r-- | dwm.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -846,12 +846,14 @@ killclient(const Arg *arg) { | |||
| 846 | 846 | ||
| 847 | void | 847 | void |
| 848 | manage(Window w, XWindowAttributes *wa) { | 848 | manage(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 */ |
