summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecp_nistp224.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ec/ecp_nistp224.c')
-rw-r--r--crypto/ec/ecp_nistp224.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c
index 0c11abc089..cf56368fb2 100644
--- a/crypto/ec/ecp_nistp224.c
+++ b/crypto/ec/ecp_nistp224.c
@@ -236,7 +236,7 @@ static const felem gmul[2][16][3] = {
/* Precomputation for the group generator. */
struct nistp224_pre_comp_st {
felem g_pre_comp[2][16][3];
- int references;
+ CRYPTO_REF_COUNT references;
CRYPTO_RWLOCK *lock;
};
@@ -1239,7 +1239,7 @@ NISTP224_PRE_COMP *EC_nistp224_pre_comp_dup(NISTP224_PRE_COMP *p)
{
int i;
if (p != NULL)
- CRYPTO_atomic_add(&p->references, 1, &i, p->lock);
+ CRYPTO_UP_REF(&p->references, &i, p->lock);
return p;
}
@@ -1250,7 +1250,7 @@ void EC_nistp224_pre_comp_free(NISTP224_PRE_COMP *p)
if (p == NULL)
return;
- CRYPTO_atomic_add(&p->references, -1, &i, p->lock);
+ CRYPTO_DOWN_REF(&p->references, &i, p->lock);
REF_PRINT_COUNT("EC_nistp224", x);
if (i > 0)
return;