Commit 253d39bf authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

mpr: Use the ARRAY_SIZE() macro.

parent 077db39c
......@@ -130,9 +130,8 @@ static void _tryLoadProvider(PCWSTR provider)
HKEY hKey;
TRACE("%s\n", debugstr_w(provider));
snprintfW(serviceName, sizeof(serviceName) / sizeof(WCHAR), serviceFmt,
servicePrefix, provider);
serviceName[sizeof(serviceName) / sizeof(WCHAR) - 1] = '\0';
snprintfW(serviceName, ARRAY_SIZE(serviceName), serviceFmt, servicePrefix, provider);
serviceName[ARRAY_SIZE(serviceName) - 1] = '\0';
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, serviceName, 0, KEY_READ, &hKey) ==
ERROR_SUCCESS)
{
......@@ -2127,7 +2126,7 @@ DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
if (wideLocalName)
{
WCHAR wideRemoteStatic[MAX_PATH];
DWORD wideRemoteSize = sizeof(wideRemoteStatic) / sizeof(WCHAR);
DWORD wideRemoteSize = ARRAY_SIZE(wideRemoteStatic);
MultiByteToWideChar(CP_ACP, 0, lpLocalName, -1, wideLocalName, len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment