Chromium Code Reviews| Index: chrome/installer/mini_installer/decompress.cc |
| diff --git a/chrome/installer/mini_installer/decompress.cc b/chrome/installer/mini_installer/decompress.cc |
| index ed9098a85211d735ed004ba4f6f02e48e55b1d0e..6440b214c548a04f775ed84794522413b38a98e8 100644 |
| --- a/chrome/installer/mini_installer/decompress.cc |
| +++ b/chrome/installer/mini_installer/decompress.cc |
| @@ -5,6 +5,7 @@ |
| #include <windows.h> // NOLINT |
| #include <fcntl.h> // for _O_* constants |
| #include <fdi.h> |
| +#include <stdlib.h> |
| #include "chrome/installer/mini_installer/decompress.h" |
| @@ -191,12 +192,12 @@ bool InitializeFdi() { |
| }; |
| wchar_t path[MAX_PATH] = {0}; |
|
grt (UTC plus 2)
2015/05/06 16:46:34
change this to:
static const DWORD kBufferSize
tfarina
2015/05/06 17:21:55
Done.
|
| - for (int i = 0; i < arraysize(candidate_paths); ++i) { |
| + for (int i = 0; i < _countof(candidate_paths); ++i) { |
|
grt (UTC plus 2)
2015/05/06 16:46:34
this also looks like a job for:
for (const wch
tfarina
2015/05/06 17:21:55
Done.
|
| path[0] = L'\0'; |
| DWORD result = ::ExpandEnvironmentStringsW(candidate_paths[i], |
| - path, arraysize(path)); |
| + path, _countof(path)); |
| - if (result > 0 && result <= arraysize(path)) |
| + if (result > 0 && result <= _countof(path)) |
| g_fdi = ::LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); |
| if (g_fdi) |