diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 387eecbd3e0..f6674313f8e 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1898,7 +1898,7 @@ static const struct knownFolderDef known_folders[] = { { 0 } }; #undef KNOWN_FOLDER -BOOL known_folder_found[sizeof(known_folders)/sizeof(known_folders[0])-1]; +BOOL known_folder_found[ARRAY_SIZE(known_folders)-1]; static BOOL is_in_strarray(const WCHAR *needle, const char *hay) { @@ -1914,7 +1914,7 @@ static BOOL is_in_strarray(const WCHAR *needle, const char *hay) if(strcmp(hay, "(null)") == 0 && !needle) return TRUE; - ret = MultiByteToWideChar(CP_ACP, 0, hay, -1, wstr, sizeof(wstr)/sizeof(wstr[0])); + ret = MultiByteToWideChar(CP_ACP, 0, hay, -1, wstr, ARRAY_SIZE(wstr)); if(ret == 0) { ok(0, "Failed to convert string\n"); @@ -1967,7 +1967,7 @@ static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId ok_(__FILE__, known_folder->line)(hr == S_OK, "cannot get known folder definition for %s\n", known_folder->sFolderId); if(SUCCEEDED(hr)) { - ret = MultiByteToWideChar(CP_ACP, 0, known_folder->sName, -1, sName, sizeof(sName)/sizeof(sName[0])); + ret = MultiByteToWideChar(CP_ACP, 0, known_folder->sName, -1, sName, ARRAY_SIZE(sName)); ok_(__FILE__, known_folder->line)(ret != 0, "cannot convert known folder name \"%s\" to wide characters\n", known_folder->sName); ok_(__FILE__, known_folder->line)(lstrcmpW(kfd.pszName, sName)==0, "invalid known folder name returned for %s: %s expected, but %s retrieved\n", known_folder->sFolderId, wine_dbgstr_w(sName), wine_dbgstr_w(kfd.pszName)); @@ -2063,10 +2063,10 @@ static void test_knownFolders(void) GetWindowsDirectoryW( sWinDir, MAX_PATH ); - GetTempPathW(sizeof(sExamplePath)/sizeof(sExamplePath[0]), sExamplePath); + GetTempPathW(ARRAY_SIZE(sExamplePath), sExamplePath); lstrcatW(sExamplePath, sExample); - GetTempPathW(sizeof(sExample2Path)/sizeof(sExample2Path[0]), sExample2Path); + GetTempPathW(ARRAY_SIZE(sExample2Path), sExample2Path); lstrcatW(sExample2Path, sExample2); lstrcpyW(sSubFolderPath, sExamplePath); @@ -2172,7 +2172,7 @@ static void test_knownFolders(void) ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); ok(folder == NULL, "got %p\n", folder); - for(i=0; i