summaryrefslogtreecommitdiff
path: root/components/libc/pthreads/pthread_cond.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-03-08 18:19:04 +0800
committerMeco Man <[email protected]>2021-03-08 18:19:04 +0800
commit3c05a4e7193ee553bf502560e7de4be6489c7629 (patch)
tree69771215353ad4697e7c12a969f9bada32129265 /components/libc/pthreads/pthread_cond.c
parentce86058201432e865b8d7c4096b3675642a43a42 (diff)
[compoenets] auto & manual formatted
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)