summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bio
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/bio')
-rw-r--r--lib/libcrypto/bio/bio_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libcrypto/bio/bio_lib.c b/lib/libcrypto/bio/bio_lib.c
index 2f490a42f97..ba715392237 100644
--- a/lib/libcrypto/bio/bio_lib.c
+++ b/lib/libcrypto/bio/bio_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio_lib.c,v 1.52 2024/03/02 09:22:41 tb Exp $ */
+/* $OpenBSD: bio_lib.c,v 1.53 2024/03/27 01:22:30 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -198,8 +198,7 @@ LCRYPTO_ALIAS(BIO_vfree);
int
BIO_up_ref(BIO *bio)
{
- int refs = CRYPTO_add(&bio->references, 1, CRYPTO_LOCK_BIO);
- return (refs > 1) ? 1 : 0;
+ return CRYPTO_add(&bio->references, 1, CRYPTO_LOCK_BIO) > 1;
}
LCRYPTO_ALIAS(BIO_up_ref);