]> git.sesse.net Git - vlc/commitdiff
Fix very unlikely race condition
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 25 Nov 2006 15:42:36 +0000 (15:42 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 25 Nov 2006 15:42:36 +0000 (15:42 +0000)
src/misc/mtime.c

index 9dabb402617ee618533cc806ef940002a0606860..b32551faf7162549c9ab0837ba35b8dede569591 100644 (file)
@@ -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 )