summaryrefslogtreecommitdiff
path: root/sysdeps/generic/pt-mutex-trylock.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-28 02:03:11 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-28 02:03:11 +0200
commit8657c93f0adeefd1b50d54ae30aa0a4ba2d89827 (patch)
tree4fde4d311d435ab0f5413e168f4c99767f7032ef /sysdeps/generic/pt-mutex-trylock.c
parented3150fb7413fce0321ad88a22de7871a301f7c3 (diff)
Fix coding style
Diffstat (limited to 'sysdeps/generic/pt-mutex-trylock.c')
-rw-r--r--sysdeps/generic/pt-mutex-trylock.c10
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)