mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-23 13:31:08 +00:00
Fix bug in threading sample implementation #667
This commit is contained in:
parent
d8fcfe7850
commit
702dcd0ef4
|
@ -32,7 +32,7 @@
|
||||||
#if defined(MBEDTLS_THREADING_PTHREAD)
|
#if defined(MBEDTLS_THREADING_PTHREAD)
|
||||||
static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex )
|
static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex )
|
||||||
{
|
{
|
||||||
if( mutex == NULL || mutex->is_valid )
|
if( mutex == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0;
|
mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0;
|
||||||
|
|
Loading…
Reference in a new issue