summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_rwlockattr.c
diff options
context:
space:
mode:
authorJason Evans <jasone@FreeBSD.org>1999-12-18 01:00:42 +0000
committerJason Evans <jasone@FreeBSD.org>1999-12-18 01:00:42 +0000
commit386812d440d0d5a37b4dbed04202c2524693a8a3 (patch)
tree268f765c89398b85fde55c310249287356fc033f /lib/libpthread/thread/thr_rwlockattr.c
parent1e7a9f724ca23a355085503b4ba9ed5725c4b243 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_rwlockattr.c')
-rw-r--r--lib/libpthread/thread/thr_rwlockattr.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libpthread/thread/thr_rwlockattr.c b/lib/libpthread/thread/thr_rwlockattr.c
index 3330ba19ff3e..7a56bca7d4ba 100644
--- a/lib/libpthread/thread/thr_rwlockattr.c
+++ b/lib/libpthread/thread/thr_rwlockattr.c
@@ -81,16 +81,13 @@ pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr)
}
int
-pthread_rwlockattr_setpshared (pthread_rwlockattr_t *rwlockattr,
- int *pshared)
+pthread_rwlockattr_setpshared (pthread_rwlockattr_t *rwlockattr, int pshared)
{
- int ps = *pshared;
-
- /* only PTHREAD_PROCESS_PRIVATE is supported */
- if (ps != PTHREAD_PROCESS_PRIVATE)
+ /* Only PTHREAD_PROCESS_PRIVATE is supported. */
+ if (pshared != PTHREAD_PROCESS_PRIVATE)
return(EINVAL);
- (*rwlockattr)->pshared = ps;
+ (*rwlockattr)->pshared = pshared;
return(0);
}