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/dsa/dsa_lib.c | |
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/dsa/dsa_lib.c')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_lib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c index 65eb65288d..2727e220f9 100644 --- a/src/lib/libcrypto/dsa/dsa_lib.c +++ b/src/lib/libcrypto/dsa/dsa_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_lib.c,v 1.46 2023/11/29 21:35:57 tb Exp $ */ | 1 | /* $OpenBSD: dsa_lib.c,v 1.47 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 | * |
@@ -176,8 +176,7 @@ LCRYPTO_ALIAS(DSA_free); | |||
176 | int | 176 | int |
177 | DSA_up_ref(DSA *r) | 177 | DSA_up_ref(DSA *r) |
178 | { | 178 | { |
179 | int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DSA); | 179 | return CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DSA) > 1; |
180 | return i > 1 ? 1 : 0; | ||
181 | } | 180 | } |
182 | LCRYPTO_ALIAS(DSA_up_ref); | 181 | LCRYPTO_ALIAS(DSA_up_ref); |
183 | 182 | ||