diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-06 20:54:33 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-06 21:11:49 +0200 |
commit | 1f67c7f5e023856932162883181a872f09eabf1b (patch) | |
tree | 0e8baf876f3658b10b65ed586f3254b09df798b8 /src | |
parent | e6a8b181f8e242e78c5c893c751d8ab179987fd2 (diff) | |
download | merchant-1f67c7f5e023856932162883181a872f09eabf1b.tar.gz merchant-1f67c7f5e023856932162883181a872f09eabf1b.tar.bz2 merchant-1f67c7f5e023856932162883181a872f09eabf1b.zip |
check return value from TALER_amount_get_zero
Diffstat (limited to 'src')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 10 | ||||
-rw-r--r-- | src/lib/test_merchant_api.c | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 7a33577c..d0265d5c 100644 --- 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 index 10695b9a..dbc2d5c3 100644 --- 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, ";")) |