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

Fix assertion

parent d9e21e4f
......@@ -146,7 +146,7 @@ void *vlc_hold (gc_object_t * p_gc)
{
uintptr_t refs;
assert( p_gc );
assert ((((uintptr_t)&refs) & (sizeof (void *) - 1)) == 0); /* alignment */
assert ((((uintptr_t)&p_gc->refs) & (sizeof (void *) - 1)) == 0); /* alignment */
#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
refs = __sync_add_and_fetch (&p_gc->refs, 1);
......@@ -174,7 +174,7 @@ void vlc_release (gc_object_t *p_gc)
unsigned refs;
assert( p_gc );
assert ((((uintptr_t)&refs) & (sizeof (void *) - 1)) == 0); /* alignment */
assert ((((uintptr_t)&p_gc->refs) & (sizeof (void *) - 1)) == 0); /* alignment */
#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
refs = __sync_sub_and_fetch (&p_gc->refs, 1);
......
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