aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-06 20:54:42 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-06 20:54:42 +0200
commitdbab0c658734c14436a89bd7fc76b295cbcf5448 (patch)
tree45c76147c8da84a4a9911803fca54744aa36725a /src/exchange-lib
parent2f715c27f82584cb65855785144877da628fe35c (diff)
check return value from TALER_amount_get_zero
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/exchange_api_common.c13
-rw-r--r--src/exchange-lib/exchange_api_reserve.c10
2 files changed, 13 insertions, 10 deletions
diff --git a/src/exchange-lib/exchange_api_common.c b/src/exchange-lib/exchange_api_common.c
index 99086a71f..9d2a827f2 100644
--- a/src/exchange-lib/exchange_api_common.c
+++ b/src/exchange-lib/exchange_api_common.c
@@ -42,7 +42,6 @@ TALER_EXCHANGE_verify_coin_history (const char *currency,
struct TALER_Amount *total)
{
size_t len;
- size_t off;
int add;
struct TALER_Amount rtotal;
@@ -57,11 +56,13 @@ TALER_EXCHANGE_verify_coin_history (const char *currency,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- TALER_amount_get_zero (currency,
- total);
- TALER_amount_get_zero (currency,
- &rtotal);
- for (off=0;off<len;off++)
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ total));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ &rtotal));
+ for (size_t off=0;off<len;off++)
{
json_t *transaction;
struct TALER_Amount amount;
diff --git a/src/exchange-lib/exchange_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c
index 644a9919c..40c9d491d 100644
--- a/src/exchange-lib/exchange_api_reserve.c
+++ b/src/exchange-lib/exchange_api_reserve.c
@@ -104,10 +104,12 @@ parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
struct TALER_Amount total_out;
size_t off;
- TALER_amount_get_zero (currency,
- &total_in);
- TALER_amount_get_zero (currency,
- &total_out);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ &total_in));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ &total_out));
uuid_off = 0;
for (off=0;off<history_length;off++)
{