summaryrefslogtreecommitdiff
path: root/components/libc/pthreads/pthread_cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc/pthreads/pthread_cond.c')
-rw-r--r--components/libc/pthreads/pthread_cond.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/libc/pthreads/pthread_cond.c b/components/libc/pthreads/pthread_cond.c
index 38dc697469..59c271bf6e 100644
--- a/components/libc/pthreads/pthread_cond.c
+++ b/components/libc/pthreads/pthread_cond.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -84,10 +84,10 @@ int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
rt_snprintf(cond_name, sizeof(cond_name), "cond%02d", cond_num++);
- if (attr == RT_NULL) /* use default value */
- cond->attr = PTHREAD_PROCESS_PRIVATE;
- else
- cond->attr = *attr;
+ if (attr == RT_NULL) /* use default value */
+ cond->attr = PTHREAD_PROCESS_PRIVATE;
+ else
+ cond->attr = *attr;
result = rt_sem_init(&cond->sem, cond_name, 0, RT_IPC_FLAG_FIFO);
if (result != RT_EOK)