From cdc9d9618052c883f667eea96258cfa95f05efb7 Mon Sep 17 00:00:00 2001 From: Peter Hofmann Date: Sun, 15 Jun 2014 11:08:58 +0200 Subject: Refactor: Declare variables at the beginning of functions --- browser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser.c b/browser.c index bc0093b..dd62228 100644 --- a/browser.c +++ b/browser.c @@ -159,6 +159,7 @@ client_destroy(GtkWidget *obj, gpointer data) void client_new(const gchar *uri) { + struct Client *c; gchar *capitalized_name = NULL; if (cooperative_instances && !cooperative_alone) @@ -168,7 +169,7 @@ client_new(const gchar *uri) return; } - struct Client *c = malloc(sizeof(struct Client)); + c = malloc(sizeof(struct Client)); if (!c) { fprintf(stderr, __NAME__": fatal: malloc failed\n"); -- cgit v1.2.3