summary refs log tree commit diff
path: root/sysdeps/pthread/tst-tsd5.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread/tst-tsd5.c')
-rw-r--r--sysdeps/pthread/tst-tsd5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/pthread/tst-tsd5.c b/sysdeps/pthread/tst-tsd5.c
index 5f62b5a6e8..e875863892 100644
--- a/sysdeps/pthread/tst-tsd5.c
+++ b/sysdeps/pthread/tst-tsd5.c
@@ -53,7 +53,8 @@ do_test (void)
       puts ("key_create failed");
       return 1;
     }
-  if (pthread_setspecific (k, (void *) 1) != 0)
+  /* Use an arbitrary but valid pointer as the value.  */
+  if (pthread_setspecific (k, (void *) &k) != 0)
     {
       puts ("setspecific failed");
       return 1;