diff options
author | Matt Caswell <matt@openssl.org> | 2017-06-21 15:56:12 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-08-21 08:44:44 +0100 |
commit | fb7621cb4bea395566b8c1d301f1b2978abdfde5 (patch) | |
tree | dfc848c5bb17261c7955545955c1b5e731678a24 /crypto/threads_none.c | |
parent | e40ada04f45927eccf166adb067ee0ec795cefd4 (diff) |
Remove OPENSSL_assert() from crypto/threads_none.c
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3740)
Diffstat (limited to 'crypto/threads_none.c')
-rw-r--r-- | crypto/threads_none.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; } |