[KERNEL32_APITEST] Careless
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sat, 6 Apr 2019 04:55:03 +0000 (13:55 +0900)
committerKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sat, 6 Apr 2019 04:55:03 +0000 (13:55 +0900)
modules/rostests/apitests/kernel32/MultiByteToWideChar.c

index 0e2add1..a3f6e8f 100644 (file)
@@ -173,25 +173,26 @@ static void TestEntry(const ENTRY *pEntry)
 
 typedef NTSTATUS (WINAPI* RTLGETVERSION)(PRTL_OSVERSIONINFOW);
 
-static OSVERSIONINFOW *GetRealOSVersion(void)
+static RTL_OSVERSIONINFOW *GetRealOSVersion(void)
 {
-    static OSVERSIONINFOW osvi = { 0 };
+    static RTL_OSVERSIONINFOW osvi = { 0 };
+    RTL_OSVERSIONINFOW *ptr = NULL;
     HINSTANCE hNTDLL = LoadLibraryW(L"ntdll.dll");
+    RTLGETVERSION fn;
     if (hNTDLL)
     {
-        RTLGETVERSION fn;
         fn = (RTLGETVERSION)GetProcAddress(hNTDLL, "RtlGetVersion");
         if (fn)
         {
             osvi.dwOSVersionInfoSize = sizeof(osvi);
             if (fn(&osvi) == STATUS_SUCCESS)
             {
-                return &osvi;
+                ptr = &osvi;
             }
         }
         FreeLibrary(hNTDLL);
     }
-    return NULL;
+    return ptr;
 }
 
 static BOOL IsWin10Plus(void)