summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-aggregator.c
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-04-17 19:25:08 +0000
committerng0 <ng0@n0.is>2019-04-17 19:25:08 +0000
commit28123fd1fc5e9084c99ba70364ff8feaaa62d501 (patch)
tree37c11a8e1d81c0faab0c97d03a601f7eb9b1d09b /src/exchange/taler-exchange-aggregator.c
parentc1d6806b5746b5d0668e640d90531b147c1774b1 (diff)
downloadexchange-28123fd1fc5e9084c99ba70364ff8feaaa62d501.tar.gz
exchange-28123fd1fc5e9084c99ba70364ff8feaaa62d501.tar.bz2
exchange-28123fd1fc5e9084c99ba70364ff8feaaa62d501.zip
Refactor for GNUNET_memcmp
Diffstat (limited to 'src/exchange/taler-exchange-aggregator.c')
-rw-r--r--src/exchange/taler-exchange-aggregator.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index af0c8e6c0..299b892fc 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,