diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-28 01:39:41 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-28 01:39:41 +0200 |
commit | 3849b385c44d8d8a2332c826e18d31cff7327e45 (patch) | |
tree | 7c00561a25e703446598315326a13a3a8b9a01b2 /sysdeps/generic/pt-rwlock-init.c | |
parent | 08ed02b9705b7bce1b8d79da6455d59a31295212 (diff) |
Fix coding style
Diffstat (limited to 'sysdeps/generic/pt-rwlock-init.c')
-rw-r--r-- | sysdeps/generic/pt-rwlock-init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/generic/pt-rwlock-init.c b/sysdeps/generic/pt-rwlock-init.c index 0009801..0ef8432 100644 --- a/sysdeps/generic/pt-rwlock-init.c +++ b/sysdeps/generic/pt-rwlock-init.c @@ -26,7 +26,7 @@ _pthread_rwlock_init (pthread_rwlock_t *rwlock, { *rwlock = (pthread_rwlock_t) __PTHREAD_RWLOCK_INITIALIZER; - if (!attr + if (attr == NULL || memcmp (attr, &__pthread_default_rwlockattr, sizeof (*attr) == 0)) /* Use the default attributes. */ return 0; @@ -34,7 +34,7 @@ _pthread_rwlock_init (pthread_rwlock_t *rwlock, /* Non-default attributes. */ rwlock->__attr = malloc (sizeof *attr); - if (!rwlock->__attr) + if (rwlock->__attr == NULL) return ENOMEM; *rwlock->__attr = *attr; |