mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 04:08:25 +02:00
c11/threads: correct assertion
We should assert when either the function or the flag pointer is null or we'll end up with a null reference a few lines later. Currently unused by mesa thus it has gone unnoticed. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
07109cfd99
commit
469416f988
1 changed files with 1 additions and 1 deletions
|
|
@ -296,7 +296,7 @@ static void impl_tss_dtor_invoke()
|
|||
static inline void
|
||||
call_once(once_flag *flag, void (*func)(void))
|
||||
{
|
||||
assert(!flag && !func);
|
||||
assert(flag && func);
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE
|
||||
{
|
||||
struct impl_call_once_param param;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue