summaryrefslogtreecommitdiff
path: root/lib/librthread
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2012-03-02 23:11:58 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2012-03-02 23:11:58 +0000
commitda6ee612f9cc5cf7a0d1d9c97c01ae3815ed28fd (patch)
tree834552cff69e8e3a36e8b6f7e12280926059d04f /lib/librthread
parent5d84361807edd70dca33b818114c0ab3caee7f29 (diff)
fix check when setting the contention scope. harmless atm but still wrong.
guenther@ ok.
Diffstat (limited to 'lib/librthread')
-rw-r--r--lib/librthread/rthread_attr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_attr.c b/lib/librthread/rthread_attr.c
index 7bd33248b4b..17dc0794c9f 100644
--- a/lib/librthread/rthread_attr.c
+++ b/lib/librthread/rthread_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_attr.c,v 1.16 2012/02/19 06:53:58 guenther Exp $ */
+/* $OpenBSD: rthread_attr.c,v 1.17 2012/03/02 23:11:57 fgsch Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -188,7 +188,7 @@ pthread_attr_getscope(const pthread_attr_t *attrp, int *contentionscope)
int
pthread_attr_setscope(pthread_attr_t *attrp, int contentionscope)
{
- if (contentionscope != PTHREAD_SCOPE_SYSTEM ||
+ if (contentionscope != PTHREAD_SCOPE_SYSTEM &&
contentionscope != PTHREAD_SCOPE_PROCESS)
return (EINVAL);
(*attrp)->contention_scope = contentionscope;