[PATCH] shlwapi: Remove a cast that's not really needed

Nikolay Sivov nsivov at codeweavers.com
Tue Jan 5 14:48:22 CST 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/shlwapi/stopwatch.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/shlwapi/stopwatch.c b/dlls/shlwapi/stopwatch.c
index 7a7007e..c7b4356 100644
--- a/dlls/shlwapi/stopwatch.c
+++ b/dlls/shlwapi/stopwatch.c
@@ -190,16 +190,16 @@ void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserve
  */
 DWORD WINAPI GetPerfTime(void)
 {
-  static LONG64 iCounterFreq = 0;
+  static LARGE_INTEGER iCounterFreq = { 0 };
   LARGE_INTEGER iCounter;
 
   TRACE("()\n");
 
-  if (!iCounterFreq)
-   QueryPerformanceFrequency((LARGE_INTEGER*)&iCounterFreq);
+  if (!iCounterFreq.QuadPart)
+   QueryPerformanceFrequency(&iCounterFreq);
 
   QueryPerformanceCounter(&iCounter);
-  iCounter.QuadPart = iCounter.QuadPart * 1000 / iCounterFreq;
+  iCounter.QuadPart = iCounter.QuadPart * 1000 / iCounterFreq.QuadPart;
   return iCounter.u.LowPart;
 }
 
-- 
2.6.4




More information about the wine-patches mailing list