From 86e89a86d1a40bc6bc479e28d6976fee8d28acd4 Mon Sep 17 00:00:00 2001
From: Christof Schulze <christof.schulze@gmx.net>
Date: Sun, 24 Sep 2017 23:49:00 +0200
Subject: [PATCH] gluon-mesh-vpn-fastd: make respondd module compile again
 (#1228)

by moving the declaration of ret to the top of get_fastd()
---
 package/gluon-mesh-vpn-fastd/src/respondd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/gluon-mesh-vpn-fastd/src/respondd.c b/package/gluon-mesh-vpn-fastd/src/respondd.c
index 2103dff7f..a2d87b3ad 100644
--- a/package/gluon-mesh-vpn-fastd/src/respondd.c
+++ b/package/gluon-mesh-vpn-fastd/src/respondd.c
@@ -75,6 +75,7 @@ static struct json_object * get_fastd_version(void) {
 
 static struct json_object * get_fastd(void) {
 	bool enabled = false;
+	struct json_object *ret = json_object_new_object();
 
 	struct uci_context *ctx = uci_alloc_context();
 	if (!ctx)
@@ -93,11 +94,10 @@ static struct json_object * get_fastd(void) {
 	if (!enabled_str || !strcmp(enabled_str, "1"))
 		enabled = true;
 
- disabled:
+disabled:
 	uci_free_context(ctx);
- disabled_nofree:
 
-	struct json_object *ret = json_object_new_object();
+disabled_nofree:
 	json_object_object_add(ret, "version", get_fastd_version());
 	json_object_object_add(ret, "enabled", json_object_new_boolean(enabled));
 	return ret;
-- 
GitLab