summaryrefslogtreecommitdiff
path: root/src/json
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-25 16:18:24 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-25 16:18:24 +0200
commiteb559970846f0fa27f1f25c482cd07210a56f4b1 (patch)
tree8526637825e520e1420b17515934ced794a33c01 /src/json
parent3742239c13001433eeade439a0e0490f07351c43 (diff)
downloadexchange-eb559970846f0fa27f1f25c482cd07210a56f4b1.tar.gz
exchange-eb559970846f0fa27f1f25c482cd07210a56f4b1.tar.bz2
exchange-eb559970846f0fa27f1f25c482cd07210a56f4b1.zip
re-format code
Diffstat (limited to 'src/json')
-rw-r--r--src/json/json_helper.c4
-rw-r--r--src/json/json_wire.c6
-rw-r--r--src/json/test_json.c22
-rw-r--r--src/json/test_json_wire.c8
4 files changed, 21 insertions, 19 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
index c8eab065..b915faba 100644
--- a/src/json/json_helper.c
+++ b/src/json/json_helper.c
@@ -234,7 +234,7 @@ parse_amount_nbo (void *cls,
strcpy (amount.currency, currency);
(void) TALER_amount_normalize (&amount);
TALER_amount_hton (r_amount,
- &amount);
+ &amount);
return GNUNET_OK;
}
@@ -247,7 +247,7 @@ parse_amount_nbo (void *cls,
*/
struct GNUNET_JSON_Specification
TALER_JSON_spec_amount_nbo (const char *name,
- struct TALER_AmountNBO *r_amount)
+ struct TALER_AmountNBO *r_amount)
{
struct GNUNET_JSON_Specification ret = {
.parser = &parse_amount_nbo,
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index 57a0db10..c83d5255 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -101,7 +101,8 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
*/
int
TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
- const struct TALER_MasterPublicKeyP *master_pub)
+ const struct
+ TALER_MasterPublicKeyP *master_pub)
{
const char *payto_url;
struct TALER_MasterSignatureP master_sig;
@@ -143,7 +144,8 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
*/
json_t *
TALER_JSON_exchange_wire_signature_make (const char *payto_url,
- const struct TALER_MasterPrivateKeyP *master_priv)
+ const struct
+ TALER_MasterPrivateKeyP *master_priv)
{
struct TALER_MasterSignatureP master_sig;
struct TALER_MasterPublicKeyP master_pub;
diff --git a/src/json/test_json.c b/src/json/test_json.c
index d5b6d13e..5d751bf4 100644
--- a/src/json/test_json.c
+++ b/src/json/test_json.c
@@ -37,32 +37,32 @@ test_amount ()
struct TALER_Amount a2;
struct GNUNET_JSON_Specification spec[] = {
TALER_JSON_spec_amount ("amount", &a2),
- GNUNET_JSON_spec_end()
+ GNUNET_JSON_spec_end ()
};
GNUNET_assert (GNUNET_OK ==
- TALER_string_to_amount ("EUR:4.3",
- &a1));
- j = json_pack("{s:o}", "amount", TALER_JSON_from_amount (&a1));
+ TALER_string_to_amount ("EUR:4.3",
+ &a1));
+ j = json_pack ("{s:o}", "amount", TALER_JSON_from_amount (&a1));
GNUNET_assert (NULL != j);
GNUNET_assert (GNUNET_OK ==
- GNUNET_JSON_parse (j, spec,
+ GNUNET_JSON_parse (j, spec,
NULL, NULL));
GNUNET_assert (0 ==
- TALER_amount_cmp (&a1,
- &a2));
+ TALER_amount_cmp (&a1,
+ &a2));
json_decref (j);
return 0;
}
int
-main(int argc,
- const char *const argv[])
+main (int argc,
+ const char *const argv[])
{
GNUNET_log_setup ("test-json",
- "WARNING",
- NULL);
+ "WARNING",
+ NULL);
if (0 != test_amount ())
return 1;
return 0;
diff --git a/src/json/test_json_wire.c b/src/json/test_json_wire.c
index 9e59dfa8..ad6b2342 100644
--- a/src/json/test_json_wire.c
+++ b/src/json/test_json_wire.c
@@ -25,8 +25,8 @@
int
-main(int argc,
- const char *const argv[])
+main (int argc,
+ const char *const argv[])
{
struct TALER_MasterPublicKeyP master_pub;
struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
@@ -34,7 +34,7 @@ main(int argc,
json_t *wire;
const char *payto = "payto://x-taler-bank/42";
char *p;
-
+
GNUNET_log_setup ("test-json-wire",
"WARNING",
NULL);
@@ -52,7 +52,7 @@ main(int argc,
TALER_JSON_exchange_wire_signature_check (wire,
&master_pub));
json_decref (wire);
-
+
return 0;
}