summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/keygetspecific.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/keygetspecific.c')
-rw-r--r--cpukit/posix/src/keygetspecific.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c
index eeab2e3130..9c54112fde 100644
--- a/cpukit/posix/src/keygetspecific.c
+++ b/cpukit/posix/src/keygetspecific.c
@@ -49,19 +49,14 @@ void *pthread_getspecific(
switch ( location ) {
case OBJECTS_LOCAL:
- search_node.key = key;
- search_node.thread_id = _Thread_Executing->Object.id;
- p = _RBTree_Find( &_POSIX_Keys_Key_value_lookup_tree,
- &search_node.Key_value_lookup_node );
- key_data = NULL;
- if ( p ) {
+ p = _POSIX_Keys_Find( key, _Thread_Executing->Object.id, &search_node );
+ if ( p != NULL ) {
value_pair_p = _RBTree_Container_of( p,
POSIX_Keys_Key_value_pair,
Key_value_lookup_node );
- /* key_data = _RBTree_Container_of( p, */
- /* POSIX_Keys_Key_value_pair, */
- /* Key_value_lookup_node )->value; */
key_data = value_pair_p->value;
+ } else {
+ key_data = NULL;
}
_Objects_Put( &the_key->Object );