diff options
Diffstat (limited to 'sysdeps/generic/pt-mutex-trylock.c')
-rw-r--r-- | sysdeps/generic/pt-mutex-trylock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/generic/pt-mutex-trylock.c b/sysdeps/generic/pt-mutex-trylock.c index 3a0fcfe..b19611b 100644 --- a/sysdeps/generic/pt-mutex-trylock.c +++ b/sysdeps/generic/pt-mutex-trylock.c @@ -40,9 +40,9 @@ __pthread_mutex_trylock (struct __pthread_mutex *mutex) /* Acquired the lock. */ { #if defined(ALWAYS_TRACK_MUTEX_OWNER) -#ifndef NDEBUG +# ifndef NDEBUG self = _pthread_self (); - if (self) + if (self != NULL) /* The main thread may take a lock before the library is fully initialized, in particular, before the main thread has a TCB. */ @@ -50,10 +50,10 @@ __pthread_mutex_trylock (struct __pthread_mutex *mutex) assert (mutex->__owner == NULL); mutex->__owner = _pthread_self (); } -#endif +# endif #endif - if (attr) + if (attr != NULL) switch (attr->__mutex_type) { case PTHREAD_MUTEX_NORMAL: @@ -75,7 +75,7 @@ __pthread_mutex_trylock (struct __pthread_mutex *mutex) err = EBUSY; - if (attr) + if (attr != NULL) { self = _pthread_self (); switch (attr->__mutex_type) |