diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-25 01:40:00 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-25 01:42:20 -0700 |
commit | 7ab5a513926846a3e20ef12d2888c5d2aea501a6 (patch) | |
tree | 02890922b78e19696c1357294a31b3ccf14a466f /src/desktop.c | |
parent | 58aa58b6a7b641f851335ae2af28315ac2de2c50 (diff) |
*: s/malloc/calloc/
Eliminate some 0/NULL initializations.
Diffstat (limited to 'src/desktop.c')
-rw-r--r-- | src/desktop.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/desktop.c b/src/desktop.c index 44c23f0..80f75f7 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -122,14 +122,13 @@ vwm_desktop_t * vwm_desktop_create(vwm_t *vwm, char *name) { vwm_desktop_t *desktop; - desktop = malloc(sizeof(vwm_desktop_t)); + desktop = calloc(1, sizeof(vwm_desktop_t)); if (desktop == NULL) { VWM_PERROR("Failed to allocate desktop"); goto _fail; } desktop->name = name == NULL ? name : strdup(name); - desktop->focused_window = NULL; list_add_tail(&desktop->desktops, &vwm->desktops); list_add_tail(&desktop->desktops_mru, &vwm->desktops_mru); |