mapi32: Use the ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2018-07-20 21:45:44 +02:00 committed by Alexandre Julliard
parent 84b7a8f05e
commit fdc9f3dce9
2 changed files with 5 additions and 5 deletions

View File

@ -542,8 +542,8 @@ ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam,
}
/* Display an error message since we apparently have no mail clients */
LoadStringW(hInstMAPI32, IDS_NO_MAPI_CLIENT, error_msg, sizeof(error_msg) / sizeof(WCHAR));
LoadStringW(hInstMAPI32, IDS_SEND_MAIL, msg_title, sizeof(msg_title) / sizeof(WCHAR));
LoadStringW(hInstMAPI32, IDS_NO_MAPI_CLIENT, error_msg, ARRAY_SIZE(error_msg));
LoadStringW(hInstMAPI32, IDS_SEND_MAIL, msg_title, ARRAY_SIZE(msg_title));
MessageBoxW((HWND) uiparam, error_msg, msg_title, MB_ICONEXCLAMATION);
@ -701,8 +701,8 @@ ULONG WINAPI MAPISendMailW(LHANDLE session, ULONG_PTR uiparam,
}
/* Display an error message since we apparently have no mail clients */
LoadStringW(hInstMAPI32, IDS_NO_MAPI_CLIENT, error_msg, sizeof(error_msg) / sizeof(WCHAR));
LoadStringW(hInstMAPI32, IDS_SEND_MAIL, msg_title, sizeof(msg_title) / sizeof(WCHAR));
LoadStringW(hInstMAPI32, IDS_NO_MAPI_CLIENT, error_msg, ARRAY_SIZE(error_msg));
LoadStringW(hInstMAPI32, IDS_SEND_MAIL, msg_title, ARRAY_SIZE(msg_title));
MessageBoxW((HWND) uiparam, error_msg, msg_title, MB_ICONEXCLAMATION);

View File

@ -903,7 +903,7 @@ BOOL WINAPI FGetComponentPath(LPCSTR component, LPCSTR qualifier, LPSTR dll_path
char lcid_ver[20];
UINT i;
for (i = 0; i < sizeof(fmt)/sizeof(fmt[0]); i++)
for (i = 0; i < ARRAY_SIZE(fmt); i++)
{
/* FIXME: what's the correct behaviour here? */
if (!qualifier || qualifier == lcid_ver)