winlin

reserach st: refine key.c

@@ -97,8 +97,9 @@ int st_thread_setspecific(int key, void *value) @@ -97,8 +97,9 @@ int st_thread_setspecific(int key, void *value)
97 97
98 void *st_thread_getspecific(int key) 98 void *st_thread_getspecific(int key)
99 { 99 {
100 - if (key < 0 || key >= key_max) 100 + if (key < 0 || key >= key_max) {
101 return NULL; 101 return NULL;
  102 + }
102 103
103 return ((_ST_CURRENT_THREAD())->private_data[key]); 104 return ((_ST_CURRENT_THREAD())->private_data[key]);
104 } 105 }