From: Katayama Hirofumi MZ Date: Sat, 6 Apr 2019 04:55:03 +0000 (+0900) Subject: [KERNEL32_APITEST] Careless X-Git-Tag: 0.4.13-dev~46 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=eee53c734be1740fdd0f3809b89540ebb7c3f124;hp=0cdee99e055538c490c5e7874eac9932305afa37 [KERNEL32_APITEST] Careless --- diff --git a/modules/rostests/apitests/kernel32/MultiByteToWideChar.c b/modules/rostests/apitests/kernel32/MultiByteToWideChar.c index 0e2add12496..a3f6e8ff469 100644 --- a/modules/rostests/apitests/kernel32/MultiByteToWideChar.c +++ b/modules/rostests/apitests/kernel32/MultiByteToWideChar.c @@ -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)