diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-31 19:06:22 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-31 19:06:22 -0400 |
commit | c1b39b203dc3614469f2581fa4d6146cf0ac2af0 (patch) | |
tree | 8b72493929c326628d636b1b15ed53facd909e3e | |
parent | c9806fc2f9b68be8942740da508eaaf0695d020e (diff) | |
download | musl-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.c | 2 |
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; } |