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 (a73e1dd4 -> 71acaff


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated (a73e1dd4 -> 71acaff2)
Date: Wed, 10 Apr 2019 22:52:00 +0200

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

ng0 pushed a change to branch master
in repository exchange.

    from a73e1dd4 fix docu: section name changed
     new 7bebb3c7 Refactor testing_api_cmd_payback for GNUNET_memcmp
     new b7b53da0 Refactor exchange_api_handle for GNUNET_memcmp
     new f54d6294 Refactor test_exchangedb_auditors for GNUNET_memcmp
     new 2699155b Refactor test_exchangedb_denomkeys for GNUNET_memcmp
     new 71acaff2 Merge branch 'master' of git.taler.net:exchange

The 5 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/exchangedb/test_exchangedb_auditors.c  | 20 ++++++++------------
 src/exchangedb/test_exchangedb_denomkeys.c |  5 ++---
 src/lib/exchange_api_handle.c              | 20 ++++++++------------
 src/lib/testing_api_cmd_payback.c          |  3 +--
 4 files changed, 19 insertions(+), 29 deletions(-)

diff --git a/src/exchangedb/test_exchangedb_auditors.c 
b/src/exchangedb/test_exchangedb_auditors.c
index bc5d378f..9424919c 100644
--- a/src/exchangedb/test_exchangedb_auditors.c
+++ b/src/exchangedb/test_exchangedb_auditors.c
@@ -78,30 +78,26 @@ auditor_cb (void *cls,
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-  if (0 != memcmp (&want_apub,
-                   apub,
-                   sizeof (struct TALER_AuditorPublicKeyP)))
+  if (0 != GNUNET_memcmp (&want_apub,
+                          apub))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-  if (0 != memcmp (&want_mpub,
-                   mpub,
-                   sizeof (struct TALER_MasterPublicKeyP)))
+  if (0 != GNUNET_memcmp (&want_mpub,
+                          mpub))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-  if (0 != memcmp (&want_asigs,
-                   asigs,
-                   sizeof (struct TALER_AuditorSignatureP)))
+  if (0 != GNUNET_memcmp (&want_asigs,
+                          asigs))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-  if (0 != memcmp (&want_dki,
-                   dki,
-                   sizeof (struct TALER_DenominationKeyValidityPS)))
+  if (0 != GNUNET_memcmp (&want_dki,
+                          dki))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
diff --git a/src/exchangedb/test_exchangedb_denomkeys.c 
b/src/exchangedb/test_exchangedb_denomkeys.c
index 1b63f234..a8e7af04 100644
--- a/src/exchangedb/test_exchangedb_denomkeys.c
+++ b/src/exchangedb/test_exchangedb_denomkeys.c
@@ -95,9 +95,8 @@ dki_iter_revoked (void *cls,
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-  if (0 != memcmp (denom_hash,
-                   &exp->issue.properties.denom_hash,
-                   sizeof (struct GNUNET_HashCode)))
+  if (0 != GNUNET_memcmp (denom_hash,
+                          &exp->issue.properties.denom_hash))
   {
     GNUNET_break (0);
     return GNUNET_SYSERR;
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 44747b27..e0a6f6b7 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -988,9 +988,8 @@ decode_keys_json (const json_t *resp_obj,
       {
         struct TALER_EXCHANGE_AuditorInformation *aix = &key_data->auditors[j];
 
-       if (0 == memcmp (&ai.auditor_pub,
-                        &aix->auditor_pub,
-                        sizeof (struct TALER_AuditorPublicKeyP)))
+       if (0 == GNUNET_memcmp (&ai.auditor_pub,
+                            &aix->auditor_pub))
        {
          found = GNUNET_YES;
           /* Merge denomination key signatures of downloaded /keys into 
existing
@@ -1953,9 +1952,8 @@ TALER_EXCHANGE_get_signing_key_details (const struct 
TALER_EXCHANGE_Keys *keys,
   {
     struct TALER_EXCHANGE_SigningPublicKey *spk = &keys->sign_keys[i];
 
-    if (0 == memcmp (pub,
-                    &spk->key,
-                    sizeof (struct TALER_ExchangePublicKeyP)))
+    if (0 == GNUNET_memcmp (pub,
+                            &spk->key))
       return spk;
   }
   return NULL;
@@ -1981,9 +1979,8 @@ TALER_EXCHANGE_test_signing_key (const struct 
TALER_EXCHANGE_Keys *keys,
   for (unsigned int i=0;i<keys->num_sign_keys;i++)
     if ( (keys->sign_keys[i].valid_from.abs_value_us <= now.abs_value_us + 60 
* 60 * 1000LL * 1000LL) &&
          (keys->sign_keys[i].valid_until.abs_value_us > now.abs_value_us - 60 
* 60 * 1000LL * 1000LL) &&
-         (0 == memcmp (pub,
-                       &keys->sign_keys[i].key,
-                       sizeof (struct TALER_ExchangePublicKeyP))) )
+         (0 == GNUNET_memcmp (pub,
+                              &keys->sign_keys[i].key)) )
       return GNUNET_OK;
   return GNUNET_SYSERR;
 }
@@ -2034,9 +2031,8 @@ TALER_EXCHANGE_get_denomination_key_by_hash (const struct 
TALER_EXCHANGE_Keys *k
                                              const struct GNUNET_HashCode *hc)
 {
   for (unsigned int i=0;i<keys->num_denom_keys;i++)
-    if (0 == memcmp (hc,
-                     &keys->denom_keys[i].h_key,
-                     sizeof (struct GNUNET_HashCode)))
+    if (0 == GNUNET_memcmp (hc,
+                            &keys->denom_keys[i].h_key))
       return &keys->denom_keys[i];
   return NULL;
 }
diff --git a/src/lib/testing_api_cmd_payback.c 
b/src/lib/testing_api_cmd_payback.c
index dd8652ae..9b49108c 100644
--- a/src/lib/testing_api_cmd_payback.c
+++ b/src/lib/testing_api_cmd_payback.c
@@ -188,8 +188,7 @@ payback_cb (void *cls,
       TALER_TESTING_interpreter_fail (is);
       return;
     }
-    if (0 != memcmp (reserve_pub, &rp,
-                     sizeof (struct TALER_ReservePublicKeyP)))
+    if (0 != GNUNET_memcmp (reserve_pub, &rp))
     {
       GNUNET_break (0);
       TALER_TESTING_interpreter_fail (is);

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



reply via email to

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