Remove an unnecessary test in pthread_getspecific().

This commit is contained in:
nathanw 2003-05-15 19:13:24 +00:00
parent 2b0b925316
commit a06836c083
1 changed files with 3 additions and 6 deletions

View File

@ -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 <sys/cdefs.h>
__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 <errno.h>
@ -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]);
}