diff options
Diffstat (limited to 'lib/libpthread/thread/thr_detach.c')
-rw-r--r-- | lib/libpthread/thread/thr_detach.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libpthread/thread/thr_detach.c b/lib/libpthread/thread/thr_detach.c index 08cace4..c8f312c 100644 --- a/lib/libpthread/thread/thr_detach.c +++ b/lib/libpthread/thread/thr_detach.c @@ -49,8 +49,7 @@ pthread_detach(pthread_t * p_pthread) /* Check for invalid calling parameters: */ if (p_pthread == NULL || (pthread = *p_pthread) == NULL) { /* Return an invalid argument error: */ - errno = EINVAL; - rval = -1; + rval = EINVAL; } /* Check if the thread has not been detached: */ else if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) { @@ -70,8 +69,7 @@ pthread_detach(pthread_t * p_pthread) *p_pthread = NULL; } else { /* Return an error: */ - errno = ESRCH; - rval = -1; + rval = ESRCH; } /* Unblock signals: */ |