rename macro

This commit is contained in:
Özgür Kesim 2022-01-24 09:39:19 +01:00
parent 8fe127eb2e
commit 0dfd1af8d7
Signed by: oec
GPG Key ID: 3D76A56D79EDD9D7
4 changed files with 9 additions and 7 deletions

View File

@ -142,7 +142,7 @@ TEH_RESPONSE_compile_transaction_history (
/* Age restriction is optional. We communicate a NULL value to /* Age restriction is optional. We communicate a NULL value to
* JSON_PACK below */ * JSON_PACK below */
if (! TALER_AgeHash_isZero (&melt->h_age_commitment)) if (! TALER_AgeHash_isNullOrZero (&melt->h_age_commitment))
phac = &melt->h_age_commitment; phac = &melt->h_age_commitment;
if (0 != if (0 !=

View File

@ -312,10 +312,11 @@ struct TALER_AgeHash
}; };
extern const struct TALER_AgeHash TALER_AgeHash_zeroHash; extern const struct TALER_AgeHash TALER_AgeHash_zeroHash;
#define TALER_AgeHash_isZero(ph) ((NULL == ph) || \ #define TALER_AgeHash_isNullOrZero(ph) ((NULL == ph) || \
(0 == memcmp (ph, \ (0 == memcmp (ph, \
&TALER_AgeHash_zeroHash, \ &TALER_AgeHash_zeroHash, \
sizeof(struct TALER_AgeHash)))) sizeof(struct \
TALER_AgeHash))))
/** /**
* @brief Type of public keys for Taler coins. The same key material is used * @brief Type of public keys for Taler coins. The same key material is used

View File

@ -593,7 +593,8 @@ TALER_EXCHANGE_verify_coin_history (
&fee, &fee,
&rc, &rc,
h_denom_pub, h_denom_pub,
TALER_AgeHash_isZero (&h_age_commitment) ? TALER_AgeHash_isNullOrZero (
&h_age_commitment) ?
NULL : &h_age_commitment, NULL : &h_age_commitment,
coin_pub, coin_pub,
&sig)) &sig))

View File

@ -26,7 +26,7 @@
#include <gcrypt.h> #include <gcrypt.h>
/** /**
* Used in TALER_AgeHash_isZero for comparison * Used in TALER_AgeHash_isNullOrZero for comparison
*/ */
const struct TALER_AgeHash TALER_AgeHash_zeroHash = {0}; const struct TALER_AgeHash TALER_AgeHash_zeroHash = {0};