Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit186cee6c2b5d80046c71022d422f9df17bbd21d5 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-01-30 03:59:22 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-01-30 03:59:37 +0100
Filese171959dbbe575ce09f5b8bb203a97f4768e6146
goodwolf-186cee6c2b5d80046c71022d422f9df17bbd21d5.tar
goodwolf-186cee6c2b5d80046c71022d422f9df17bbd21d5.tar.gz
goodwolf-186cee6c2b5d80046c71022d422f9df17bbd21d5.zip
Parentd4a4b0ab1b5809a7a85b786135627bf9e0448908 (diff)
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.c9
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");