You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/29 04:13:23 UTC
[incubator-nuttx-apps] 04/04: testing/ostest/barrier: Remove
duplicate initialization of the barrier's attributes.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit b1fb24d5b9c206492dededd973d9e5558c890dab
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Wed Jul 28 17:05:11 2021 +0200
testing/ostest/barrier: Remove duplicate initialization of the barrier's
attributes.
Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
testing/ostest/barrier.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/testing/ostest/barrier.c b/testing/ostest/barrier.c
index a304448..8fc9768 100644
--- a/testing/ostest/barrier.c
+++ b/testing/ostest/barrier.c
@@ -107,6 +107,8 @@ void barrier_test(void)
printf("barrier_test: Initializing barrier\n");
+ /* Create the barrier */
+
status = pthread_barrierattr_init(&barrierattr);
if (status != OK)
{
@@ -122,10 +124,6 @@ void barrier_test(void)
status);
}
- /* Create the barrier */
-
- pthread_barrierattr_init(&barrierattr);
-
/* Start CONFIG_TESTING_OSTEST_NBARRIER_THREADS thread instances */
status = pthread_attr_init(&attr);