summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-03-25 01:40:00 -0700
committerVito Caputo <vcaputo@gnugeneration.com>2017-03-25 01:42:20 -0700
commit7ab5a513926846a3e20ef12d2888c5d2aea501a6 (patch)
tree02890922b78e19696c1357294a31b3ccf14a466f /src/window.c
parent58aa58b6a7b641f851335ae2af28315ac2de2c50 (diff)
*: s/malloc/calloc/
Eliminate some 0/NULL initializations.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index b90b0ae..4d4463b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -464,7 +464,7 @@ vwm_window_t * vwm_win_manage_xwin(vwm_t *vwm, vwm_xwindow_t *xwin)
goto _fail;
}
- if (!(vwin = (vwm_window_t *)malloc(sizeof(vwm_window_t)))) {
+ if (!(vwin = (vwm_window_t *)calloc(1, sizeof(vwm_window_t)))) {
VWM_PERROR("Failed to allocate vwin");
goto _fail;
}
@@ -486,7 +486,6 @@ vwm_window_t * vwm_win_manage_xwin(vwm_t *vwm, vwm_xwindow_t *xwin)
vwin->desktop = vwm->focused_desktop;
vwin->autoconfigured = VWM_WIN_AUTOCONF_NONE;
- vwin->mapping = vwin->unmapping = vwin->configuring = 0;
vwin->shelved = (vwm->focused_context == VWM_CONTEXT_SHELF); /* if we're in the shelf when the window is created, the window is shelved */
vwin->client = xwin->attrs; /* remember whatever the current attributes are */
© All Rights Reserved