diff options
author | tb <> | 2024-03-27 01:22:30 +0000 |
---|---|---|
committer | tb <> | 2024-03-27 01:22:30 +0000 |
commit | d63e16568602c2845543acd93bc322272a7ab788 (patch) | |
tree | c0c42a2b8c4163dc6824836c943bda44cac3d87e /src/lib/libcrypto/bio | |
parent | 1a774a12617e73fb42e142f6fe5d6c3c1c5cb9fe (diff) | |
download | openbsd-d63e16568602c2845543acd93bc322272a7ab788.tar.gz openbsd-d63e16568602c2845543acd93bc322272a7ab788.tar.bz2 openbsd-d63e16568602c2845543acd93bc322272a7ab788.zip |
Unify *_up_ref() implementations
No need for an inconsistently named local variable and a ternary operator.
ok jsing
Diffstat (limited to 'src/lib/libcrypto/bio')
-rw-r--r-- | src/lib/libcrypto/bio/bio_lib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c index 2f490a42f9..ba71539223 100644 --- a/src/lib/libcrypto/bio/bio_lib.c +++ b/src/lib/libcrypto/bio/bio_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_lib.c,v 1.52 2024/03/02 09:22:41 tb Exp $ */ | 1 | /* $OpenBSD: bio_lib.c,v 1.53 2024/03/27 01:22:30 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -198,8 +198,7 @@ LCRYPTO_ALIAS(BIO_vfree); | |||
198 | int | 198 | int |
199 | BIO_up_ref(BIO *bio) | 199 | BIO_up_ref(BIO *bio) |
200 | { | 200 | { |
201 | int refs = CRYPTO_add(&bio->references, 1, CRYPTO_LOCK_BIO); | 201 | return CRYPTO_add(&bio->references, 1, CRYPTO_LOCK_BIO) > 1; |
202 | return (refs > 1) ? 1 : 0; | ||
203 | } | 202 | } |
204 | LCRYPTO_ALIAS(BIO_up_ref); | 203 | LCRYPTO_ALIAS(BIO_up_ref); |
205 | 204 | ||