Module: Mesa Branch: master Commit: 469416f988bcd471fb6058cdfb5ffebe840545da URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=469416f988bcd471fb6058cdfb5ffebe840545da
Author: Emil Velikov <[email protected]> Date: Fri Aug 1 17:39:49 2014 +0100 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> --- include/c11/threads_win32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/c11/threads_win32.h b/include/c11/threads_win32.h index 5298a84..d017c31 100644 --- a/include/c11/threads_win32.h +++ b/include/c11/threads_win32.h @@ -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; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
