summaryrefslogtreecommitdiff
path: root/lib/libcrypto/x509/x_all.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-03-27 01:22:31 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-03-27 01:22:31 +0000
commit006e86a9b78646459a16355f1d02bdb0cef17abc (patch)
treea3f3e000623675fc9c054ea309743a63fdcf4e9f /lib/libcrypto/x509/x_all.c
parentefb18f0a4498dd75d7db0ccb02bc00bf3ebeb0a8 (diff)
Unify *_up_ref() implementations
No need for an inconsistently named local variable and a ternary operator. ok jsing
Diffstat (limited to 'lib/libcrypto/x509/x_all.c')
-rw-r--r--lib/libcrypto/x509/x_all.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libcrypto/x509/x_all.c b/lib/libcrypto/x509/x_all.c
index cd6da9f409e..45c527b4189 100644
--- a/lib/libcrypto/x509/x_all.c
+++ b/lib/libcrypto/x509/x_all.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_all.c,v 1.30 2023/02/16 08:38:17 tb Exp $ */
+/* $OpenBSD: x_all.c,v 1.31 2024/03/27 01:22:30 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -535,7 +535,6 @@ LCRYPTO_ALIAS(X509_NAME_digest);
int
X509_up_ref(X509 *x)
{
- int i = CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509);
- return i > 1 ? 1 : 0;
+ return CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509) > 1;
}
LCRYPTO_ALIAS(X509_up_ref);