summaryrefslogtreecommitdiff
path: root/components/libc/pthreads
diff options
context:
space:
mode:
authorchenzx <[email protected]>2021-07-14 20:17:38 +0800
committerchenzx <[email protected]>2021-07-14 20:17:38 +0800
commiteb29bb5318b2d4b0a3ff48ed906b72c074bcc17d (patch)
tree00b8f30ba88768b25e9e3e3703ea3d6a10cb699e /components/libc/pthreads
parent236e01bead06f16dade39916fae73906767f447a (diff)
parent66cc36c70a117edc991558a80087a6d545f50fbe (diff)
Merge branch 'master' of https://github.com/wormsX/rt-thread
Diffstat (limited to 'components/libc/pthreads')
-rw-r--r--components/libc/pthreads/semaphore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/pthreads/semaphore.c b/components/libc/pthreads/semaphore.c
index 398cdf1f49..199b33bfe8 100644
--- a/components/libc/pthreads/semaphore.c
+++ b/components/libc/pthreads/semaphore.c
@@ -186,7 +186,7 @@ int sem_init(sem_t *sem, int pshared, unsigned int value)
rt_snprintf(name, sizeof(name), "psem%02d", psem_number++);
sem->sem = rt_sem_create(name, value, RT_IPC_FLAG_FIFO);
- if (sem == RT_NULL)
+ if (sem->sem == RT_NULL)
{
rt_set_errno(ENOMEM);