gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated (c1d6806b -> 1fdec6b


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated (c1d6806b -> 1fdec6b1)
Date: Wed, 17 Apr 2019 21:27:24 +0200

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

ng0 pushed a change to branch master
in repository exchange.

    from c1d6806b Refactor for GNUNET_memcmp
     new 28123fd1 Refactor for GNUNET_memcmp
     new ee9cff35 Refactor for GNUNET_memcmp
     new 1fdec6b1 Refactor for GNUNET_memcmp

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/exchange/taler-exchange-aggregator.c           | 16 ++++++----------
 src/exchange/taler-exchange-httpd_deposit.c        |  5 ++---
 src/exchange/taler-exchange-httpd_refresh_reveal.c |  5 ++---
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/src/exchange/taler-exchange-aggregator.c 
b/src/exchange/taler-exchange-aggregator.c
index af0c8e6c..299b892f 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -624,13 +624,11 @@ refund_by_coin_cb (void *cls,
 
   /* TODO: potential optimization: include these conditions
      in the SELECT! */
-  if (0 != memcmp (merchant_pub,
-                  &au->merchant_pub,
-                  sizeof (struct TALER_MerchantPublicKeyP)))
+  if (0 != GNUNET_memcmp (merchant_pub,
+                          &au->merchant_pub))
     return GNUNET_OK; /* different merchant */
-  if (0 != memcmp (h_contract,
-                  au->h_contract,
-                  sizeof (struct GNUNET_HashCode)))
+  if (0 != GNUNET_memcmp (h_contract,
+                          au->h_contract))
     return GNUNET_OK; /* different contract */
   if (GNUNET_OK !=
       TALER_amount_subtract (&au->total_amount,
@@ -795,10 +793,8 @@ aggregate_cb (void *cls,
   struct TALER_Amount delta;
   enum GNUNET_DB_QueryStatus qs;
 
-  GNUNET_break (0 ==
-                memcmp (&au->merchant_pub,
-                        merchant_pub,
-                        sizeof (struct TALER_MerchantPublicKeyP)));
+  GNUNET_break (0 == GNUNET_memcmp (&au->merchant_pub,
+                                    merchant_pub));
   /* compute contribution of this coin after fees */
   if (GNUNET_SYSERR ==
       TALER_amount_subtract (&delta,
diff --git a/src/exchange/taler-exchange-httpd_deposit.c 
b/src/exchange/taler-exchange-httpd_deposit.c
index 2aaa3c74..0cc16c25 100644
--- a/src/exchange/taler-exchange-httpd_deposit.c
+++ b/src/exchange/taler-exchange-httpd_deposit.c
@@ -467,9 +467,8 @@ TEH_DEPOSIT_handler_deposit (struct TEH_RequestHandler *rh,
                                           
TALER_EC_DEPOSIT_INVALID_WIRE_FORMAT_JSON,
                                            "wire");
   }
-  if (0 != memcmp (&deposit.h_wire,
-                  &my_h_wire,
-                  sizeof (struct GNUNET_HashCode)))
+  if (0 != GNUNET_memcmp (&deposit.h_wire,
+                          &my_h_wire))
   {
     /* Client hashed contract differently than we did, reject */
     GNUNET_JSON_parse_free (spec);
diff --git a/src/exchange/taler-exchange-httpd_refresh_reveal.c 
b/src/exchange/taler-exchange-httpd_refresh_reveal.c
index 14dd12ad..bdf59c37 100644
--- a/src/exchange/taler-exchange-httpd_refresh_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refresh_reveal.c
@@ -399,9 +399,8 @@ refresh_reveal_transaction (void *cls,
     }
 
     /* Verify rc_expected matches rc */
-    if (0 != memcmp (&rctx->rc,
-                     &rc_expected,
-                     sizeof (struct TALER_RefreshCommitmentP)))
+    if (0 != GNUNET_memcmp (&rctx->rc,
+                            &rc_expected))
     {
       GNUNET_break_op (0);
       *mhd_ret = reply_refresh_reveal_missmatch (connection,

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



reply via email to

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