From 186cee6c2b5d80046c71022d422f9df17bbd21d5 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 30 Jan 2020 03:59:22 +0100 Subject: badwolf.c: Make *window declaration static This allows to avoid a useless malloc() call done ourselves. --- badwolf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/badwolf.c b/badwolf.c index 64136f7..580fedc 100644 --- a/badwolf.c +++ b/badwolf.c @@ -744,14 +744,7 @@ badwolf_get_tab_position(GtkContainer *notebook, GtkWidget *child) int main(int argc, char *argv[]) { - // getting an abort if this one fails to alloc - struct Window *window = malloc(sizeof(struct Window)); - if(window == NULL) - { - perror("malloc"); - return 1; - } - + struct Window *window = &(struct Window){NULL}; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, DATADIR "/locale"); bind_textdomain_codeset(PACKAGE, "UTF-8"); -- cgit v1.3.1-23-gd82d