summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/attr.c b/attr.c
index c3537b0..fa7de12 100644
--- a/attr.c
+++ b/attr.c
@@ -480,7 +480,7 @@ pthread_attr_setdetachstate(pthread_attr_t *attr,
return EINVAL;
}
- if (detachstate != PTHREAD_CREATE_JOINABLE ||
+ if (detachstate != PTHREAD_CREATE_JOINABLE &&
detachstate != PTHREAD_CREATE_DETACHED)
{
return EINVAL;