Commit d22cf31f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix vlc_atomic_compare_swap() return value

(Though in practice, the only call site ignores the return value.)
parent 2e186c72
...@@ -254,7 +254,8 @@ static inline uintptr_t vlc_atomic_swap(vlc_atomic_t *atom, uintptr_t v) ...@@ -254,7 +254,8 @@ static inline uintptr_t vlc_atomic_swap(vlc_atomic_t *atom, uintptr_t v)
static inline uintptr_t vlc_atomic_compare_swap(vlc_atomic_t *atom, static inline uintptr_t vlc_atomic_compare_swap(vlc_atomic_t *atom,
uintptr_t u, uintptr_t v) uintptr_t u, uintptr_t v)
{ {
return atomic_compare_exchange_strong(&atom->u, &u, v); atomic_compare_exchange_strong(&atom->u, &u, v);
return u;
} }
/** Helper to retrieve a single precision from an atom. */ /** Helper to retrieve a single precision from an atom. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment