Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/mpr/wnet.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index 78759ecb15..ad4f1ddb65 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -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);