From 6066ffcb9b07f9e2709d0382afa3fc05c52e21c7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 18 Jun 2019 11:25:38 +0200 Subject: dead code elimination --- src/exchange/taler-exchange-httpd_refresh_reveal.c | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_refresh_reveal.c') diff --git a/src/exchange/taler-exchange-httpd_refresh_reveal.c b/src/exchange/taler-exchange-httpd_refresh_reveal.c index 0aee1982c..6fc8d1c5e 100644 --- a/src/exchange/taler-exchange-httpd_refresh_reveal.c +++ b/src/exchange/taler-exchange-httpd_refresh_reveal.c @@ -57,8 +57,6 @@ reply_refresh_reveal_success (struct MHD_Connection *connection, unsigned int num_newcoins, const struct TALER_DenominationSignature *sigs) { - json_t *root; - json_t *obj; json_t *list; int ret; @@ -67,6 +65,8 @@ reply_refresh_reveal_success (struct MHD_Connection *connection, newcoin_index < num_newcoins; newcoin_index++) { + json_t *obj; + obj = json_object (); json_object_set_new (obj, "ev_sig", @@ -75,14 +75,19 @@ reply_refresh_reveal_success (struct MHD_Connection *connection, json_array_append_new (list, obj)); } - root = json_object (); - json_object_set_new (root, - "ev_sigs", - list); - ret = TEH_RESPONSE_reply_json (connection, - root, - MHD_HTTP_OK); - json_decref (root); + + { + json_t *root; + + root = json_object (); + json_object_set_new (root, + "ev_sigs", + list); + ret = TEH_RESPONSE_reply_json (connection, + root, + MHD_HTTP_OK); + json_decref (root); + } return ret; } -- cgit v1.2.3