Commit 03bccb3e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix very unlikely race condition

parent 2f7f70b3
......@@ -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 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment