diff options
badwolf.c: Make *window declaration static
This allows to avoid a useless malloc() call done ourselves.
1 files changed, 1 insertions, 8 deletions
| -rw-r--r-- | badwolf.c | 9 |
@@ -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"); |