summaryrefslogtreecommitdiff
path: root/src/json
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-20 01:23:02 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-20 01:23:02 +0100
commit8ce6d32f63a81e6ea61971859152e4a5ec3b7c40 (patch)
treea9fbee64baa4a2001bd039dcbcbe2704b13af0a2 /src/json
parent500a7fe2bb7a5a7c722946fb0c87324e0d8172e8 (diff)
downloadexchange-8ce6d32f63a81e6ea61971859152e4a5ec3b7c40.tar.gz
exchange-8ce6d32f63a81e6ea61971859152e4a5ec3b7c40.tar.bz2
exchange-8ce6d32f63a81e6ea61971859152e4a5ec3b7c40.zip
beautification
Diffstat (limited to 'src/json')
-rw-r--r--src/json/json_helper.c2
-rw-r--r--src/json/json_wire.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
index 70326b92..746b39e4 100644
--- a/src/json/json_helper.c
+++ b/src/json/json_helper.c
@@ -38,9 +38,9 @@ TALER_JSON_from_amount (const struct TALER_Amount *amount)
char *amount_str = TALER_amount_to_string (amount);
GNUNET_assert (NULL != amount_str);
-
{
json_t *j = json_string (amount_str);
+
GNUNET_free (amount_str);
return j;
}
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index 8480b4e8..4fc4cfea 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -232,7 +232,6 @@ validate_iban (const char *iban)
char *nbuf;
unsigned long long dividend;
unsigned long long remainder;
- int nread;
unsigned int i;
unsigned int j;
@@ -287,6 +286,8 @@ validate_iban (const char *iban)
remainder = 0;
for (unsigned int i = 0; i<j; i += 16)
{
+ int nread;
+
if (1 !=
sscanf (&nbuf[i],
"%16llu %n",
@@ -311,7 +312,7 @@ validate_iban (const char *iban)
/**
- * Valudate payto://iban/ account URL (only account information,
+ * Validate payto://iban/ account URL (only account information,
* wire subject and amount are ignored).
*
* @param account_url URL to parse
@@ -319,7 +320,7 @@ validate_iban (const char *iban)
* #GNUNET_NO if @a account_url is a payto URI of a different type,
* #GNUNET_SYSERR if the IBAN (checksum) is incorrect
*/
-int
+static int
validate_payto_iban (const char *account_url)
{
const char *iban;