From 22eb07cd9b1200678d25ca4ffe43fd3b670cc42e Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sat, 17 Aug 2013 16:40:11 -0400 Subject: [PATCH] tests: Fix build on FreeBSD Avoid relying on a non-portable implementation detail for atomic_flag tests. Per the standard, the only way to obtain the value of the flag is via the return value from atomic_flag_test_and_set. Signed-off-by: Ed Maste Signed-off-by: Ben Pfaff --- tests/test-atomic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-atomic.c b/tests/test-atomic.c index e9bd6bda0..e6df1cd83 100644 --- a/tests/test-atomic.c +++ b/tests/test-atomic.c @@ -66,9 +66,9 @@ test_atomic_flag(void) { atomic_flag flag = ATOMIC_FLAG_INIT; ovs_assert(atomic_flag_test_and_set(&flag) == false); - ovs_assert(flag.b == true); + ovs_assert(atomic_flag_test_and_set(&flag) == true); atomic_flag_clear(&flag); - ovs_assert(flag.b == false); + ovs_assert(atomic_flag_test_and_set(&flag) == false); } int -- 2.43.0