From c15534028aca0177a8e4b9257d11d43ff53135df Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 14 Oct 1998 23:39:06 +0000 Subject: Thu Oct 15 14:05:01 1998 Ross Johnson * tsd.c (pthread_setspecific): Fix type declaration and cast. (pthread_getspecific): Ditto. (pthread_getspecific): Change error return value to NULL if key is not in use. Yet again. --- tsd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tsd.c') diff --git a/tsd.c b/tsd.c index 691dca9..8aa1341 100644 --- a/tsd.c +++ b/tsd.c @@ -81,7 +81,7 @@ pthread_key_create(pthread_key_t *key, void (*destructor)(void *)) int pthread_setspecific(pthread_key_t key, void *value) { - void * keys[]; + void ** keys; int inuse; /* CRITICAL SECTION */ @@ -104,7 +104,7 @@ pthread_setspecific(pthread_key_t key, void *value) void * pthread_getspecific(pthread_key_t key) { - void * keys[]; + void ** keys; int inuse; /* CRITICAL SECTION */ @@ -116,7 +116,7 @@ pthread_getspecific(pthread_key_t key) /* END CRITICAL SECTION */ if (! inuse) - return EINVAL; + return (void *) NULL; keys = (void **) TlsGetValue(_pthread_TSD_keys_TlsIndex); return keys[key]; -- cgit v1.2.3