https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eee53c734be1740fdd0f38...
commit eee53c734be1740fdd0f3809b89540ebb7c3f124 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Sat Apr 6 13:55:03 2019 +0900 Commit: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com CommitDate: Sat Apr 6 13:55:03 2019 +0900
[KERNEL32_APITEST] Careless --- modules/rostests/apitests/kernel32/MultiByteToWideChar.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/rostests/apitests/kernel32/MultiByteToWideChar.c b/modules/rostests/apitests/kernel32/MultiByteToWideChar.c index 0e2add1249..a3f6e8ff46 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)