From a06836c083ba1153002efba45f6fb59a1ae1ba0d Mon Sep 17 00:00:00 2001 From: nathanw Date: Thu, 15 May 2003 19:13:24 +0000 Subject: [PATCH] Remove an unnecessary test in pthread_getspecific(). --- lib/libpthread/pthread_specific.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/libpthread/pthread_specific.c b/lib/libpthread/pthread_specific.c index 29e1a9577270..0a45768dc897 100644 --- a/lib/libpthread/pthread_specific.c +++ b/lib/libpthread/pthread_specific.c @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_specific.c,v 1.6 2003/03/08 08:03:36 lukem Exp $ */ +/* $NetBSD: pthread_specific.c,v 1.7 2003/05/15 19:13:24 nathanw Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: pthread_specific.c,v 1.6 2003/03/08 08:03:36 lukem Exp $"); +__RCSID("$NetBSD: pthread_specific.c,v 1.7 2003/05/15 19:13:24 nathanw Exp $"); /* Functions and structures dealing with thread-specific data */ #include @@ -162,7 +162,7 @@ pthread_key_delete(pthread_key_t key) * Note that the argument in option 3 only applies because we * keep TSD in ordinary memory which follows the pthreads * visibility rules. The visibility rules are not required by - * the standard to apply to TSD, so this arguemnt doesn't + * the standard to apply to TSD, so the arguemnt doesn't * apply in general, just to this implementation. */ @@ -200,9 +200,6 @@ pthread_getspecific(pthread_key_t key) { pthread_t self; - if (pthread__tsd_alloc[key] == 0) - return NULL; - self = pthread__self(); return (self->pt_specific[key]); }