4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-20 20:57:12 +08:00

fix compiling warning.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1971 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2012-02-19 09:12:39 +00:00
parent 3fd6fd1f05
commit 9d61fc32c8

View File

@ -31,7 +31,10 @@ int pthread_setspecific(pthread_key_t key, const void *value)
RT_ASSERT(ptd != NULL);
/* check tls area */
if (ptd->tls == NULL) ptd->tls = rt_malloc(sizeof(void*) * PTHREAD_KEY_MAX);
if (ptd->tls == NULL)
{
ptd->tls = (void**)rt_malloc(sizeof(void*) * PTHREAD_KEY_MAX);
}
if ((key < PTHREAD_KEY_MAX) && _thread_keys[key].is_used)
{