From f152776dbd7d8cf072160d4d0229e1c3e4ea6f1c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 1 Mar 2010 14:06:01 -0500 Subject: [PATCH] avoid multiple evaluation of STORE_SHARED argument Signed-off-by: Mathieu Desnoyers --- urcu/system.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urcu/system.h b/urcu/system.h index e36a13b..0c3152f 100644 --- a/urcu/system.h +++ b/urcu/system.h @@ -46,9 +46,9 @@ */ #define STORE_SHARED(x, v) \ ({ \ - _STORE_SHARED(x, v); \ + typeof(x) _v = _STORE_SHARED(x, v); \ smp_wmc(); \ - (v); \ + _v; \ }) #endif /* _URCU_SYSTEM_H */ -- 2.34.1