util/u_atomic: fix return type of p_atomic_{inc,dec}_return() and p_atomic_{cmp,...
authorEric Engestrom <eric.engestrom@intel.com>
Wed, 16 Oct 2019 12:58:56 +0000 (13:58 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 16 Oct 2019 18:41:47 +0000 (19:41 +0100)
commitaaab70035a3db8da7c93965301f50e40ddbbbef9
tree8191e80d403e17d950847a435c35ccdff9967dda
parentd3b06a199ed549864ed8c78a1c0d6dff0f6e3441
util/u_atomic: fix return type of p_atomic_{inc,dec}_return() and p_atomic_{cmp,}xchg()

We're trying to cast the return type to the type of the var, but instead
we were casting `sizeof(*v)`.

Fixes: 6df72e970c0e2794a565 ("util: Make u_atomic.h typeless.")
Fixes: 0a7f17cf5b591330a257 ("util/u_atomic: add p_atomic_xchg")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/util/u_atomic.h