summaryrefslogtreecommitdiff
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 0b4041a3a9..fd03e91611 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -178,14 +178,14 @@ int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *ar
#endif
);
- if (success >= 0) {
+ if (success == 0) {
#if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D6) || defined(PY_PTHREAD_D7)
pthread_detach(&th);
#elif defined(PY_PTHREAD_STD)
pthread_detach(th);
#endif
}
- return success < 0 ? 0 : 1;
+ return success != 0 ? 0 : 1;
}
long PyThread_get_thread_ident _P0()