summary refs log tree commit diff
path: root/nptl/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pthread_getname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_getname.c b/nptl/sysdeps/unix/sysv/linux/pthread_getname.c
index 593219b8ff..6e7786f987 100644
--- a/nptl/sysdeps/unix/sysv/linux/pthread_getname.c
+++ b/nptl/sysdeps/unix/sysv/linux/pthread_getname.c
@@ -42,7 +42,7 @@ pthread_getname_np (th, buf, len)
   if (len < TASK_COMM_LEN)
     return ERANGE;
 
-  if (th == THREAD_SELF)
+  if (pd == THREAD_SELF)
     return prctl (PR_GET_NAME, buf) ? errno : 0;
 
 #define FMT "/proc/self/task/%u/comm"