mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
reserach st: refine key.c
This commit is contained in:
parent
fd0c85b324
commit
c38a545780
1 changed files with 37 additions and 36 deletions
|
@ -97,8 +97,9 @@ int st_thread_setspecific(int key, void *value)
|
|||
|
||||
void *st_thread_getspecific(int key)
|
||||
{
|
||||
if (key < 0 || key >= key_max)
|
||||
if (key < 0 || key >= key_max) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ((_ST_CURRENT_THREAD())->private_data[key]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue