From 0878d2e5e9053584a4df38d5ad6b58c9385fafeb Mon Sep 17 00:00:00 2001 From: Maxim Konovalov Date: Thu, 14 Feb 2002 15:20:36 +0000 Subject: [PATCH] Correct a typo pthread_attr_setscope() function fails unconditionally due to. PR: misc/30699 Reviewed by: jasone, ru Approved by: jasone, ru MFC after: 1 week --- lib/libc_r/uthread/uthread_attr_setscope.c | 2 +- lib/libkse/thread/thr_attr_setscope.c | 2 +- lib/libpthread/thread/thr_attr_setscope.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc_r/uthread/uthread_attr_setscope.c b/lib/libc_r/uthread/uthread_attr_setscope.c index 967cb3919a3..3614615a3c0 100644 --- a/lib/libc_r/uthread/uthread_attr_setscope.c +++ b/lib/libc_r/uthread/uthread_attr_setscope.c @@ -46,7 +46,7 @@ _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) /* Return an invalid argument: */ ret = EINVAL; } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) || - (contentionscope != PTHREAD_SCOPE_SYSTEM)) { + (contentionscope == PTHREAD_SCOPE_SYSTEM)) { /* We don't support PTHREAD_SCOPE_SYSTEM. */ ret = ENOTSUP; } else diff --git a/lib/libkse/thread/thr_attr_setscope.c b/lib/libkse/thread/thr_attr_setscope.c index 967cb3919a3..3614615a3c0 100644 --- a/lib/libkse/thread/thr_attr_setscope.c +++ b/lib/libkse/thread/thr_attr_setscope.c @@ -46,7 +46,7 @@ _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) /* Return an invalid argument: */ ret = EINVAL; } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) || - (contentionscope != PTHREAD_SCOPE_SYSTEM)) { + (contentionscope == PTHREAD_SCOPE_SYSTEM)) { /* We don't support PTHREAD_SCOPE_SYSTEM. */ ret = ENOTSUP; } else diff --git a/lib/libpthread/thread/thr_attr_setscope.c b/lib/libpthread/thread/thr_attr_setscope.c index 967cb3919a3..3614615a3c0 100644 --- a/lib/libpthread/thread/thr_attr_setscope.c +++ b/lib/libpthread/thread/thr_attr_setscope.c @@ -46,7 +46,7 @@ _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) /* Return an invalid argument: */ ret = EINVAL; } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) || - (contentionscope != PTHREAD_SCOPE_SYSTEM)) { + (contentionscope == PTHREAD_SCOPE_SYSTEM)) { /* We don't support PTHREAD_SCOPE_SYSTEM. */ ret = ENOTSUP; } else