summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hofmann <scm@uninformativ.de>2014-06-15 11:08:58 +0200
committerPeter Hofmann <scm@uninformativ.de>2014-06-15 11:08:58 +0200
commitcdc9d9618052c883f667eea96258cfa95f05efb7 (patch)
treedcd7fcfccc49fa0674007d323d204364183b33be
parente44a41aac8bb836c919b9fb0b6b6a68f7f7d32ca (diff)
downloadlariza-cdc9d9618052c883f667eea96258cfa95f05efb7.tar.gz
Refactor: Declare variables at the beginning of functions
-rw-r--r--browser.c3
1 files changed, 2 insertions, 1 deletions
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");