From 03bccb3e4d7d53f6d83c3ad942760321822a8166 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 25 Nov 2006 15:42:36 +0000 Subject: [PATCH] Fix very unlikely race condition --- src/misc/mtime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/misc/mtime.c b/src/misc/mtime.c index 9dabb40261..b32551faf7 100644 --- a/src/misc/mtime.c +++ b/src/misc/mtime.c @@ -156,10 +156,11 @@ mtime_t mdate( void ) * the RTC rather than the TSC. If it's anything else, we * presume that the performance counter is unreliable. */ + LARGE_INTEGER buf; - freq = ( QueryPerformanceFrequency( (LARGE_INTEGER *)&freq ) && + freq = ( QueryPerformanceFrequency( &buf ) && (freq == I64C(1193182) || freq == I64C(3579545) ) ) - ? freq : 0; + ? buf : 0; } if( freq != 0 ) -- 2.39.2