summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refresh_reveal.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-18 11:25:38 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-18 11:25:38 +0200
commit6066ffcb9b07f9e2709d0382afa3fc05c52e21c7 (patch)
tree6f08cc9e4b38aea696b52755afc0565dd1f2c4a9 /src/exchange/taler-exchange-httpd_refresh_reveal.c
parentb3cbe01079ea1044f8d1f8bf47e995443efe8390 (diff)
downloadexchange-6066ffcb9b07f9e2709d0382afa3fc05c52e21c7.tar.gz
exchange-6066ffcb9b07f9e2709d0382afa3fc05c52e21c7.tar.bz2
exchange-6066ffcb9b07f9e2709d0382afa3fc05c52e21c7.zip
dead code elimination
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refresh_reveal.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refresh_reveal.c25
1 files changed, 15 insertions, 10 deletions
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;
}