summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x_all.c
diff options
context:
space:
mode:
authortb <>2024-03-27 01:22:30 +0000
committertb <>2024-03-27 01:22:30 +0000
commitd63e16568602c2845543acd93bc322272a7ab788 (patch)
treec0c42a2b8c4163dc6824836c943bda44cac3d87e /src/lib/libcrypto/x509/x_all.c
parent1a774a12617e73fb42e142f6fe5d6c3c1c5cb9fe (diff)
downloadopenbsd-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 '')
-rw-r--r--src/lib/libcrypto/x509/x_all.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x_all.c b/src/lib/libcrypto/x509/x_all.c
index cd6da9f409..45c527b418 100644
--- a/src/lib/libcrypto/x509/x_all.c
+++ b/src/lib/libcrypto/x509/x_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_all.c,v 1.30 2023/02/16 08:38:17 tb Exp $ */ 1/* $OpenBSD: x_all.c,v 1.31 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 *
@@ -535,7 +535,6 @@ LCRYPTO_ALIAS(X509_NAME_digest);
535int 535int
536X509_up_ref(X509 *x) 536X509_up_ref(X509 *x)
537{ 537{
538 int i = CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509); 538 return CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509) > 1;
539 return i > 1 ? 1 : 0;
540} 539}
541LCRYPTO_ALIAS(X509_up_ref); 540LCRYPTO_ALIAS(X509_up_ref);