[vlc-commits] Fix vlc_atomic_compare_swap() return value
Rémi Denis-Courmont
git at videolan.org
Thu Aug 23 20:05:17 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 23 20:44:01 2012 +0300| [d22cf31fe1e45a3a3a61dfda61fddcbb74a29213] | committer: Rémi Denis-Courmont
Fix vlc_atomic_compare_swap() return value
(Though in practice, the only call site ignores the return value.)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d22cf31fe1e45a3a3a61dfda61fddcbb74a29213
---
include/vlc_atomic.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/vlc_atomic.h b/include/vlc_atomic.h
index 5892994..43874a7 100644
--- a/include/vlc_atomic.h
+++ b/include/vlc_atomic.h
@@ -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,
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. */
More information about the vlc-commits
mailing list