diff options
author | Roland Scheidegger <[email protected]> | 2019-12-09 18:49:13 +0100 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-12-09 15:02:58 -0800 |
commit | 23f1b78e8fd38dd844aefc19151ec31071ca5f64 (patch) | |
tree | 8cc79837106efe936541d8358ea5ac36c960afbd /src/util/u_atomic.h | |
parent | 0470a03769715a3258c04e6b18848cef321bd213 (diff) |
util/atomic: Fix p_atomic_add for unlocked and msvc paths
Braces mismatch (flagged by CI, untested).
Fixes: 385d13f26d2 "util/atomic: Add a _return variant of p_atomic_add"
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/util/u_atomic.h')
-rw-r--r-- | src/util/u_atomic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h index 9cbc6dd1eaa..1ad87c8feb1 100644 --- a/src/util/u_atomic.h +++ b/src/util/u_atomic.h @@ -89,7 +89,7 @@ #define p_atomic_dec_zero(_v) (p_atomic_dec_return(_v) == 0) #define p_atomic_inc(_v) ((void) p_atomic_inc_return(_v)) #define p_atomic_dec(_v) ((void) p_atomic_dec_return(_v)) -#define p_atomic_add(_v, _i) ((void) p_atomic_add_return((_v), (_i)) +#define p_atomic_add(_v, _i) ((void) p_atomic_add_return((_v), (_i))) #define p_atomic_inc_return(_v) (++(*(_v))) #define p_atomic_dec_return(_v) (--(*(_v))) #define p_atomic_add_return(_v, _i) (*(_v) = *(_v) + (_i)) @@ -146,7 +146,7 @@ (assert(!"should not get here"), 0)) #define p_atomic_add(_v, _i) \ - ((void) p_atomic_add_return((_v), (_i)) + ((void) p_atomic_add_return((_v), (_i))) #define p_atomic_add_return(_v, _i) (\ sizeof *(_v) == sizeof(char) ? _InterlockedExchangeAdd8 ((char *) (_v), (_i)) : \ |