From 4f9446444d0c718886570626d6e7a25d07610f1b Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 1 Aug 2019 10:54:06 -0700 Subject: vppinfra: fix spinlock and rwlock tests Type: fix Change-Id: I67b72b5ad03b972198c27bc0d927867f41b0e20b Signed-off-by: Florin Coras --- src/vppinfra/test_spinlock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/vppinfra/test_spinlock.c') diff --git a/src/vppinfra/test_spinlock.c b/src/vppinfra/test_spinlock.c index fd750d9851c..4ea0fca28ea 100644 --- a/src/vppinfra/test_spinlock.c +++ b/src/vppinfra/test_spinlock.c @@ -84,12 +84,12 @@ test_spinlock (spinlock_test_main_t * stm, f64 * elapse_time) for (uword t_num = 0; t_num < stm->threads_per_core; t_num++) { uword t_index = cores_set * stm->threads_per_core + t_num; - if (error = pthread_create (&pthread[t_index], NULL, - &inc_shared_counter, stm)) + if ((error = pthread_create (&pthread[t_index], NULL, + &inc_shared_counter, stm))) clib_unix_warning ("pthread_create failed with %d", error); - if (error = pthread_setaffinity_np (pthread[t_index], - sizeof (cpu_set_t), &cpuset)) + if ((error = pthread_setaffinity_np (pthread[t_index], + sizeof (cpu_set_t), &cpuset))) clib_unix_warning ("pthread_setaffinity_np failed with %d", error); } @@ -103,7 +103,7 @@ test_spinlock (spinlock_test_main_t * stm, f64 * elapse_time) for (uword thread_num = 0; thread_num < num_threads; thread_num++) { f64 *time; - if (error = pthread_join (pthread[thread_num], (void *) &time)) + if ((error = pthread_join (pthread[thread_num], (void *) &time))) clib_unix_warning ("pthread_join failed with %d", error); *elapse_time += *time; vec_free (time); -- cgit 1.2.3-korg