From d77bf8ab53c03d2d39e90493b2f1c65816f8d6fb Mon Sep 17 00:00:00 2001 From: ng0 Date: Mon, 8 Apr 2019 15:45:52 +0000 Subject: [PATCH] Refactor for GNUNET_memcmp and _is_zero --- src/exchange-tools/taler-exchange-keyup.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/exchange-tools/taler-exchange-keyup.c b/src/exchange-tools/taler-exchange-keyup.c index dcbc83d07..f2b48a534 100644 --- a/src/exchange-tools/taler-exchange-keyup.c +++ b/src/exchange-tools/taler-exchange-keyup.c @@ -1308,9 +1308,8 @@ run (void *cls, return; } if (0 != - memcmp (&master_public_key, - &master_public_key_from_cfg, - sizeof (struct TALER_MasterPublicKeyP))) + GNUNET_memcmp (&master_public_key, + &master_public_key_from_cfg)) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, "exchange", @@ -1363,9 +1362,7 @@ run (void *cls, global_ret = 1; return; } - if ( (0 != memcmp (&zero, - &revoke_dkh, - sizeof (zero))) && + if ( (0 != GNUNET_is_zero memcmp (&revoke_dkh)) && (GNUNET_OK != revoke_denomination (&revoke_dkh)) ) {