From: Norbert Pocs Date: Thu, 3 Jul 2025 14:11:39 +0000 (+0200) Subject: crypto/threads_pthread.c optimize ossl_(un)likely X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e740864976565964fbbbb62e01f18306b1fa8206;p=thirdparty%2Fopenssl.git crypto/threads_pthread.c optimize ossl_(un)likely Signed-off-by: Norbert Pocs Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27961) --- diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c index e3b262e7db7..df7954f84cc 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -901,7 +901,7 @@ void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock) int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void)) { - if (pthread_once(once, init) != 0) + if (ossl_unlikely(pthread_once(once, init) != 0)) return 0; return 1;