summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-08-01 17:39:49 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-08-12 23:36:05 +0100
commit469416f988bcd471fb6058cdfb5ffebe840545da (patch)
tree50730e495e6cdd335c9eaa12400a9d81efe6ad78 /include
parent07109cfd996e43cb64433864279e6a4b4d6fccf3 (diff)
downloadexternal_mesa3d-469416f988bcd471fb6058cdfb5ffebe840545da.zip
external_mesa3d-469416f988bcd471fb6058cdfb5ffebe840545da.tar.gz
external_mesa3d-469416f988bcd471fb6058cdfb5ffebe840545da.tar.bz2
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>
Diffstat (limited to 'include')
-rw-r--r--include/c11/threads_win32.h2
1 files changed, 1 insertions, 1 deletions
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;