projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
056f9d8
)
reject invalid arguments to pthread_barrierattr_setpshared
author
Rich Felker
<dalias@aerifal.cx>
Tue, 28 Aug 2018 22:12:17 +0000
(18:12 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 28 Aug 2018 22:12:17 +0000
(18:12 -0400)
this is a POSIX requirement.
src/thread/pthread_barrierattr_setpshared.c
patch
|
blob
|
history
diff --git
a/src/thread/pthread_barrierattr_setpshared.c
b/src/thread/pthread_barrierattr_setpshared.c
index b391461e16d19adb68ba310fee7d091f1f98c765..c2d2929dcf8e975fd8d743800eb78dfc2be4c9db 100644
(file)
--- a/
src/thread/pthread_barrierattr_setpshared.c
+++ b/
src/thread/pthread_barrierattr_setpshared.c
@@
-2,6
+2,7
@@
int pthread_barrierattr_setpshared(pthread_barrierattr_t *a, int pshared)
{
+ if (pshared > 1U) return EINVAL;
a->__attr = pshared ? INT_MIN : 0;
return 0;
}