commit 1f67c7f5e023856932162883181a872f09eabf1b
parent e6a8b181f8e242e78c5c893c751d8ab179987fd2
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 6 Oct 2017 20:54:33 +0200
check return value from TALER_amount_get_zero
Diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
@@ -2132,8 +2132,9 @@ process_deposits_for_refund_cb (void *cls,
struct TALER_Amount deposit_amount_with_fee[num_results];
struct TALER_Amount deposit_refund_fee[num_results];
- TALER_amount_get_zero (ctx->refund->currency,
- ¤t_refund);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (ctx->refund->currency,
+ ¤t_refund));
/* Pass 1: Collect amount of existing refunds into current_refund.
* Also store existing refunded amount for each deposit in deposit_refund. */
@@ -2170,8 +2171,9 @@ process_deposits_for_refund_cb (void *cls,
GNUNET_PQ_query_param_end
};
- TALER_amount_get_zero (ctx->refund->currency,
- &ictx.refunded_amount);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (ctx->refund->currency,
+ &ictx.refunded_amount));
ictx.err = GNUNET_OK; /* no error so far */
ires = GNUNET_PQ_eval_prepared_multi_select (ctx->pg->conn,
"find_refunds",
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
@@ -1328,8 +1328,9 @@ refund_lookup_cb (void *cls,
find_command (is,
cmd->details.refund_lookup.pay_ref)));
icoin_refs = GNUNET_strdup (pay->details.pay.coin_ref);
- TALER_amount_get_zero ("EUR",
- &acc);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero ("EUR",
+ &acc));
for (icoin_ref = strtok (icoin_refs, ";");
NULL != icoin_ref;
icoin_ref = strtok (NULL, ";"))