From 3cd3dd5b0b7cfe3888ae6f805a8f4c59f034834e Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 1 Jan 2024 12:22:46 +0100 Subject: Silence uninitialized variable warning Signed-off-by: Tim Wiederhake --- src/add_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add_window.c b/src/add_window.c index 3895729..39a9325 100644 --- a/src/add_window.c +++ b/src/add_window.c @@ -1388,7 +1388,7 @@ CreateTwmColormap(Colormap c) { TwmColormap *cmap; - cmap = malloc(sizeof(TwmColormap)); + cmap = calloc(1, sizeof(TwmColormap)); if (!cmap || XSaveContext(dpy, c, ColormapContext, (XPointer) cmap)) { if (cmap) free(cmap); -- cgit v1.2.3