Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/gameux/tests/gameexplorer.c | 8 ++++---- dlls/gameux/tests/gamestatistics.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index 05c2a1104f..0a235863bf 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -143,7 +143,7 @@ static HRESULT _buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, if(gameInstanceId) { if(SUCCEEDED(hr)) - hr = (StringFromGUID2(gameInstanceId, sInstanceId, sizeof(sInstanceId)/sizeof(sInstanceId[0])) ? S_OK : E_FAIL); + hr = (StringFromGUID2(gameInstanceId, sInstanceId, ARRAY_SIZE(sInstanceId)) ? S_OK : E_FAIL);
if(SUCCEEDED(hr)) { @@ -294,7 +294,7 @@ static void _validateGameRegistryValues(int line, HRESULT hr; WCHAR sGameApplicationId[40];
- hr = (StringFromGUID2(gameApplicationId, sGameApplicationId, sizeof(sGameApplicationId)/sizeof(sGameApplicationId[0])) ? S_OK : E_FAIL); + hr = (StringFromGUID2(gameApplicationId, sGameApplicationId, ARRAY_SIZE(sGameApplicationId)) ? S_OK : E_FAIL); ok_(__FILE__, line)(hr == S_OK, "cannot convert game application id to string\n");
/* these values exist up from Vista */ @@ -547,7 +547,7 @@ static void test_add_remove_game(void) if(ge) { /* prepare path to binary */ - dwExeNameLen = GetModuleFileNameW(NULL, sExeName, sizeof (sExeName) / sizeof (sExeName[0])); + dwExeNameLen = GetModuleFileNameW(NULL, sExeName, ARRAY_SIZE(sExeName)); ok(dwExeNameLen != 0, "GetModuleFileNameW returned invalid value\n"); lstrcpynW(sExePath, sExeName, StrRChrW(sExeName, NULL, '\') - sExeName + 1); bstrExeName = SysAllocString(sExeName); @@ -625,7 +625,7 @@ static void test_install_uninstall_game(void) if(ge2) { /* prepare path to binary */ - dwExeNameLen = GetModuleFileNameW(NULL, sExeName, sizeof (sExeName) / sizeof (sExeName[0])); + dwExeNameLen = GetModuleFileNameW(NULL, sExeName, ARRAY_SIZE(sExeName)); ok(dwExeNameLen != 0, "GetModuleFileNameW returned invalid value\n"); lstrcpynW(sExePath, sExeName, StrRChrW(sExeName, NULL, '\') - sExeName + 1);
diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c index ff247fcb17..d823af1aab 100644 --- a/dlls/gameux/tests/gamestatistics.c +++ b/dlls/gameux/tests/gamestatistics.c @@ -44,7 +44,7 @@ static void test_register_game(IGameExplorer **explorer) BSTR bstrExeName, bstrExePath;
/* prepare path to binary */ - GetModuleFileNameW(NULL, sExeName, sizeof (sExeName) / sizeof (sExeName[0])); + GetModuleFileNameW(NULL, sExeName, ARRAY_SIZE(sExeName));
lstrcpyW(pathW, sExeName); PathRemoveFileSpecW(pathW); @@ -101,7 +101,7 @@ static HRESULT _buildStatisticsFilePath(LPCGUID guidApplicationId, LPWSTR *lpSta hr = SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, sPath);
if(SUCCEEDED(hr)) - hr = (StringFromGUID2(guidApplicationId, sGuid, sizeof(sGuid) / sizeof(sGuid[0])) != 0 ? S_OK : E_FAIL); + hr = (StringFromGUID2(guidApplicationId, sGuid, ARRAY_SIZE(sGuid)) != 0 ? S_OK : E_FAIL);
if(SUCCEEDED(hr)) {
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at https://testbot.winehq.org/JobDetails.pl?Key=38801
Your paranoid android.
=== w1064 (64 bit gamestatistics) === gameux:gamestatistics crashed (c0000005)