gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] 02/02: check return value from TALER_amoun


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] 02/02: check return value from TALER_amount_get_zero
Date: Fri, 06 Oct 2017 21:11:54 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

commit 1f67c7f5e023856932162883181a872f09eabf1b
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Oct 6 20:54:33 2017 +0200

    check return value from TALER_amount_get_zero
---
 src/backenddb/plugin_merchantdb_postgres.c | 10 ++++++----
 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 7a33577..d0265d5 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,
-                         &current_refund);
+  GNUNET_assert (GNUNET_OK ==
+                 TALER_amount_get_zero (ctx->refund->currency,
+                                        &current_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 10695b9..dbc2d5c 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, ";"))

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]