From: Rich Felker Date: Thu, 31 Mar 2011 23:06:22 +0000 (-0400) Subject: simplify pthread_key_delete X-Git-Tag: v0.7.5~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c1b39b203dc3614469f2581fa4d6146cf0ac2af0;p=oweals%2Fmusl.git 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. --- 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; }