[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 01/05: Refactor auditor/taler-auditor.c fo
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 01/05: Refactor auditor/taler-auditor.c for GNUNET_memcmp |
Date: |
Mon, 08 Apr 2019 16:58:47 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository exchange.
commit 0b8a87126b24a9da20f5cd24dca7816f45bc34e0
Author: ng0 <address@hidden>
AuthorDate: Mon Apr 8 13:24:51 2019 +0000
Refactor auditor/taler-auditor.c for GNUNET_memcmp
---
src/auditor/taler-auditor.c | 45 ++++++++++++++++++---------------------------
1 file changed, 18 insertions(+), 27 deletions(-)
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 1b9c99c8..9d629d1e 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -1975,12 +1975,10 @@ check_transaction_history (const struct
TALER_CoinSpendPublicKeyP *coin_pub,
}
/* Check if this deposit is within the remit of the aggregation
we are investigating, if so, include it in the totals. */
- if ( (0 == memcmp (merchant_pub,
- &tl->details.deposit->merchant_pub,
- sizeof (struct TALER_MerchantPublicKeyP))) &&
- (0 == memcmp (h_contract_terms,
- &tl->details.deposit->h_contract_terms,
- sizeof (struct GNUNET_HashCode))) )
+ if ( (0 == GNUNET_memcmp (merchant_pub,
+ &tl->details.deposit->merchant_pub)) &&
+ (0 == GNUNET_memcmp (h_contract_terms,
+ &tl->details.deposit->h_contract_terms)) )
{
struct TALER_Amount amount_without_fee;
@@ -2063,12 +2061,10 @@ check_transaction_history (const struct
TALER_CoinSpendPublicKeyP *coin_pub,
}
/* Check if this refund is within the remit of the aggregation
we are investigating, if so, include it in the totals. */
- if ( (0 == memcmp (merchant_pub,
- &tl->details.refund->merchant_pub,
- sizeof (struct TALER_MerchantPublicKeyP))) &&
- (0 == memcmp (h_contract_terms,
- &tl->details.refund->h_contract_terms,
- sizeof (struct GNUNET_HashCode))) )
+ if ( (0 == GNUNET_memcmp (merchant_pub,
+ &tl->details.refund->merchant_pub)) &&
+ (0 == GNUNET_memcmp (h_contract_terms,
+ &tl->details.refund->h_contract_terms)) )
{
if (GNUNET_OK !=
TALER_amount_add (&merchant_loss,
@@ -2223,9 +2219,8 @@ wire_transfer_information_cb (void *cls,
return;
}
if (0 !=
- memcmp (&hw,
- h_wire,
- sizeof (struct GNUNET_HashCode)))
+ GNUNET_memcmp (&hw,
+ h_wire))
{
wcc->qs = GNUNET_DB_STATUS_HARD_ERROR;
report_row_inconsistency ("aggregation",
@@ -2320,18 +2315,16 @@ wire_transfer_information_cb (void *cls,
tl);
/* Check other details of wire transfer match */
- if (0 != memcmp (h_wire,
- &wcc->h_wire,
- sizeof (struct GNUNET_HashCode)))
+ if (0 != GNUNET_memcmp (h_wire,
+ &wcc->h_wire))
{
wcc->qs = GNUNET_DB_STATUS_HARD_ERROR;
report_row_inconsistency ("aggregation",
rowid,
"wire method of aggregate do not match wire
transfer");
}
- if (0 != memcmp (h_wire,
- &wcc->h_wire,
- sizeof (struct GNUNET_HashCode)))
+ if (0 != GNUNET_memcmp (h_wire,
+ &wcc->h_wire))
{
wcc->qs = GNUNET_DB_STATUS_HARD_ERROR;
report_row_inconsistency ("aggregation",
@@ -4393,9 +4386,8 @@ test_master_present (void *cls,
int *found = cls;
(void) exchange_url;
- if (0 == memcmp (mpub,
- &master_pub,
- sizeof (master_pub)))
+ if (0 == GNUNET_memcmp (mpub,
+ &master_pub))
*found = GNUNET_YES;
}
@@ -4423,9 +4415,8 @@ run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Launching auditor\n");
cfg = c;
- if (0 == memcmp (&zeromp,
- &master_pub,
- sizeof (struct TALER_MasterPublicKeyP)))
+ if (0 == GNUNET_memcmp (&zeromp,
+ &master_pub))
{
/* -m option not given, try configuration */
char *master_public_key_str;
--
To stop receiving notification emails like this one, please contact
address@hidden