summaryrefslogtreecommitdiffstats
path: root/crypto/threads_none.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-06-21 16:56:12 +0200
committerMatt Caswell <matt@openssl.org>2017-08-21 09:44:44 +0200
commitfb7621cb4bea395566b8c1d301f1b2978abdfde5 (patch)
treedfc848c5bb17261c7955545955c1b5e731678a24 /crypto/threads_none.c
parentRemove OPENSSL_assert() from crypto/pem (diff)
downloadopenssl-fb7621cb4bea395566b8c1d301f1b2978abdfde5.tar.xz
openssl-fb7621cb4bea395566b8c1d301f1b2978abdfde5.zip
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.c9
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;
}