mpr: 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:
parent
077db39cec
commit
253d39bf1d
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue