summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bio_meth.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio/bio_meth.c')
-rw-r--r--crypto/bio/bio_meth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bio/bio_meth.c b/crypto/bio/bio_meth.c
index 588c5170f7..3cbac5bf85 100644
--- a/crypto/bio/bio_meth.c
+++ b/crypto/bio/bio_meth.c
@@ -21,14 +21,14 @@ DEFINE_RUN_ONCE_STATIC(do_bio_type_init)
int BIO_get_new_index()
{
- static int bio_count = BIO_TYPE_START;
+ static CRYPTO_REF_COUNT bio_count = BIO_TYPE_START;
int newval;
if (!RUN_ONCE(&bio_type_init, do_bio_type_init)) {
BIOerr(BIO_F_BIO_GET_NEW_INDEX, ERR_R_MALLOC_FAILURE);
return -1;
}
- if (!CRYPTO_atomic_add(&bio_count, 1, &newval, bio_type_lock))
+ if (!CRYPTO_UP_REF(&bio_count, &newval, bio_type_lock))
return -1;
return newval;
}