diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-03-27 01:22:31 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-03-27 01:22:31 +0000 |
commit | 006e86a9b78646459a16355f1d02bdb0cef17abc (patch) | |
tree | a3f3e000623675fc9c054ea309743a63fdcf4e9f /lib/libcrypto/bio | |
parent | efb18f0a4498dd75d7db0ccb02bc00bf3ebeb0a8 (diff) |
Unify *_up_ref() implementations
No need for an inconsistently named local variable and a ternary operator.
ok jsing
Diffstat (limited to 'lib/libcrypto/bio')
-rw-r--r-- | lib/libcrypto/bio/bio_lib.c | 5 |
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); |