diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-10 19:34:42 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-14 19:41:48 -0700 |
commit | b99f0728ec7229423cfc65d25711208f6cac1c0e (patch) | |
tree | 9c53eb7b9b1f877e2e9ec9f4fbe8fb0622538b73 /src | |
parent | 413ca350cf9ed8d0b7678e2e43fde7e937916e64 (diff) |
xwindow: use calloc in vwm_xwindow_create()
Eliminate some initialization cruft.
Diffstat (limited to 'src')
-rw-r--r-- | src/xwindow.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/xwindow.c b/src/xwindow.c index e22ca49..a01b212 100644 --- a/src/xwindow.c +++ b/src/xwindow.c @@ -136,19 +136,15 @@ vwm_xwindow_t * vwm_xwin_create(vwm_t *vwm, Window win, vwm_grab_mode_t grabbed) /* don't create InputOnly windows */ if (attrs.class == InputOnly) goto _out_grabbed; - if (!(xwin = (vwm_xwindow_t *)malloc(sizeof(vwm_xwindow_t)))) { + if (!(xwin = (vwm_xwindow_t *)calloc(1, sizeof(vwm_xwindow_t)))) { VWM_PERROR("Failed to allocate xwin"); goto _out_grabbed; } xwin->id = win; xwin->attrs = attrs; - xwin->managed = NULL; - xwin->name = NULL; XFetchName(VWM_XDISPLAY(vwm), win, &xwin->name); - xwin->monitor = NULL; - xwin->overlay.width = xwin->overlay.height = xwin->overlay.phase = 0; xwin->overlay.gen_last_composed = -1; /* This is so we get the PropertyNotify event and can get the pid when it's set post-create, |