Browse Source

cpu: explicitely initialize the atomic_uint with a negative value

This is the same value used to compare from fd7857126a
pull/144/head
Steve Lhomme 3 years ago
parent
commit
772080a5d8
  1. 2
      src/misc/cpu.c

2
src/misc/cpu.c

@ -191,7 +191,7 @@ out:
unsigned vlc_CPU(void)
{
static atomic_uint cpu_flags = ATOMIC_VAR_INIT(-1);
static atomic_uint cpu_flags = ATOMIC_VAR_INIT(-1U);
unsigned flags = atomic_load_explicit(&cpu_flags, memory_order_relaxed);
if (unlikely(flags == -1U)) {

Loading…
Cancel
Save