summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_test.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-21 18:36:12 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-21 18:36:12 +0200
commit9160245167ded9b2b7c11716dfa1a1e8887187f4 (patch)
tree64720ebc3b69f84055f25d8a7f309b19b0ebd52a /src/exchange/taler-exchange-httpd_test.c
parent922175d3082b138f4973fe11d81327806e68021d (diff)
downloadexchange-9160245167ded9b2b7c11716dfa1a1e8887187f4.tar.gz
exchange-9160245167ded9b2b7c11716dfa1a1e8887187f4.tar.bz2
exchange-9160245167ded9b2b7c11716dfa1a1e8887187f4.zip
make use of GNUNET_JSON_from_data_auto where possible
Diffstat (limited to 'src/exchange/taler-exchange-httpd_test.c')
-rw-r--r--src/exchange/taler-exchange-httpd_test.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c
index 7c9e0820..488701d6 100644
--- a/src/exchange/taler-exchange-httpd_test.c
+++ b/src/exchange/taler-exchange-httpd_test.c
@@ -91,7 +91,7 @@ TMH_TEST_handler_test_base32 (struct TMH_RequestHandler *rh,
MHD_HTTP_OK,
"{s:o}",
"output",
- GNUNET_JSON_from_data (&hc, sizeof (struct GNUNET_HashCode)));
+ GNUNET_JSON_from_data_auto (&hc));
}
@@ -166,7 +166,7 @@ TMH_TEST_handler_test_encrypt (struct TMH_RequestHandler *rh,
&iv,
out));
json = GNUNET_JSON_from_data (out,
- in_ptr_size);
+ in_ptr_size);
GNUNET_free (out);
GNUNET_JSON_parse_free (spec);
return TMH_RESPONSE_reply_json_pack (connection,
@@ -232,8 +232,7 @@ TMH_TEST_handler_test_hkdf (struct TMH_RequestHandler *rh,
in_ptr_size,
NULL, 0);
GNUNET_JSON_parse_free (spec);
- json = GNUNET_JSON_from_data (&hc,
- sizeof (struct GNUNET_HashCode));
+ json = GNUNET_JSON_from_data_auto (&hc);
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
"{s:o}",
@@ -303,8 +302,7 @@ TMH_TEST_handler_test_ecdhe (struct TMH_RequestHandler *rh,
MHD_HTTP_OK,
"{s:o}",
"ecdh_hash",
- GNUNET_JSON_from_data (&hc,
- sizeof (hc)));
+ GNUNET_JSON_from_data_auto (&hc));
}
@@ -388,11 +386,9 @@ TMH_TEST_handler_test_eddsa (struct TMH_RequestHandler *rh,
MHD_HTTP_OK,
"{s:o, s:o}",
"eddsa_pub",
- GNUNET_JSON_from_data (&pub,
- sizeof (pub)),
+ GNUNET_JSON_from_data_auto (&pub),
"eddsa_sig",
- GNUNET_JSON_from_data (&sig,
- sizeof (sig)));
+ GNUNET_JSON_from_data_auto (&sig));
}
@@ -579,8 +575,7 @@ TMH_TEST_handler_test_transfer (struct TMH_RequestHandler *rh,
MHD_HTTP_OK,
"{s:o}",
"secret",
- GNUNET_JSON_from_data (&secret,
- sizeof (secret)));
+ GNUNET_JSON_from_data_auto (&secret));
}