aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-23 22:19:28 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-23 22:19:28 +0900
commit0f5ae7a200673d38d035e7d3165f5441fe0d49a7 (patch)
tree5f05e2745241ad1b1fb97846347ffbc25d906db2 /thread_pthread.c
parenta52a459b16ce1b5cf32cb6393960ff59e35c48d0 (diff)
downloadruby-0f5ae7a200673d38d035e7d3165f5441fe0d49a7.tar.gz
Fixed inverted current thread condition [Bug #16808]
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 6bcb18d89b..f5eebf5b58 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1622,7 +1622,7 @@ native_set_another_thread_name(rb_nativethread_id_t thread_id, VALUE name)
char buf[thread_name_max];
const char *s = "";
# if !defined SET_ANOTHER_THREAD_NAME
- if (pthread_equal(pthread_self(), thread_id)) return;
+ if (!pthread_equal(pthread_self(), thread_id)) return;
# endif
if (!NIL_P(name)) {
long n;