about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-31 19:06:22 -0400
committerRich Felker <dalias@aerifal.cx>2011-03-31 19:06:22 -0400
commitc1b39b203dc3614469f2581fa4d6146cf0ac2af0 (patch)
tree8b72493929c326628d636b1b15ed53facd909e3e
parentc9806fc2f9b68be8942740da508eaaf0695d020e (diff)
downloadmusl-c1b39b203dc3614469f2581fa4d6146cf0ac2af0.tar.gz
musl-c1b39b203dc3614469f2581fa4d6146cf0ac2af0.tar.xz
musl-c1b39b203dc3614469f2581fa4d6146cf0ac2af0.zip
simplify pthread_key_delete
calling this function on an uninitialized key value is UB, so there is
no need to check that the table pointer was initialized.
-rw-r--r--src/thread/pthread_key_delete.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_key_delete.c b/src/thread/pthread_key_delete.c
index 4914ebb4..de964567 100644
--- a/src/thread/pthread_key_delete.c
+++ b/src/thread/pthread_key_delete.c
@@ -2,6 +2,6 @@
 
 int pthread_key_delete(pthread_key_t k)
 {
-	if (libc.tsd_keys) libc.tsd_keys[k] = 0;
+	libc.tsd_keys[k] = 0;
 	return 0;
 }