From: Matt Caswell Date: Wed, 21 Jun 2017 14:56:12 +0000 (+0100) Subject: Remove OPENSSL_assert() from crypto/threads_none.c X-Git-Tag: OpenSSL_1_1_1-pre1~806 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fb7621cb4bea395566b8c1d301f1b2978abdfde5;p=oweals%2Fopenssl.git Remove OPENSSL_assert() from crypto/threads_none.c Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/3740) --- diff --git a/crypto/threads_none.c b/crypto/threads_none.c index f7e53593a2..ffad7576b1 100644 --- a/crypto/threads_none.c +++ b/crypto/threads_none.c @@ -25,19 +25,22 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void) int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock) { - OPENSSL_assert(*(unsigned int *)lock == 1); + if (!ossl_assert(*(unsigned int *)lock == 1)) + return 0; return 1; } int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock) { - OPENSSL_assert(*(unsigned int *)lock == 1); + if (!ossl_assert(*(unsigned int *)lock == 1)) + return 0; return 1; } int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock) { - OPENSSL_assert(*(unsigned int *)lock == 1); + if (!ossl_assert(*(unsigned int *)lock == 1)) + return 0; return 1; }