Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3740)
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;
}