From eb228229d82f13de3a356f7dd127fa8db5f7969c Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Wed, 28 Jul 2021 17:00:00 +0200 Subject: [PATCH] testing/smp/smp_main.c: Remove duplicate initialization of the barrier's attributes. Signed-off-by: Abdelatif Guettouche --- testing/smp/smp_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/testing/smp/smp_main.c b/testing/smp/smp_main.c index f1ba95b70..bab00fe3c 100644 --- a/testing/smp/smp_main.c +++ b/testing/smp/smp_main.c @@ -221,6 +221,8 @@ int main(int argc, FAR char *argv[]) show_cpu(" Main", 0); printf(" Main[0]: Initializing barrier\n"); + /* Create the barrier */ + ret = pthread_barrierattr_init(&barrierattr); if (ret != OK) { @@ -242,10 +244,6 @@ int main(int argc, FAR char *argv[]) goto errout_with_attr; } - /* Create the barrier */ - - pthread_barrierattr_init(&barrierattr); - /* Start CONFIG_TESTING_SMP_NBARRIER_THREADS thread instances */ ret = pthread_attr_init(&attr);