mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 04:16:35 +00:00
dplayx: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com><mailto:leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
af3920dc18
commit
3d67641d5d
|
@ -4335,7 +4335,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_EnumConnections( IDirectPlay4A *iface,
|
||||||
RegCloseKey(hkServiceProvider);
|
RegCloseKey(hkServiceProvider);
|
||||||
|
|
||||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||||
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, ARRAY_SIZE( buff ));
|
||||||
CLSIDFromString( buff, &serviceProviderGUID );
|
CLSIDFromString( buff, &serviceProviderGUID );
|
||||||
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
||||||
|
|
||||||
|
@ -4433,7 +4433,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_EnumConnections( IDirectPlay4A *iface,
|
||||||
RegCloseKey(hkServiceProvider);
|
RegCloseKey(hkServiceProvider);
|
||||||
|
|
||||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||||
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, ARRAY_SIZE( buff ));
|
||||||
CLSIDFromString( buff, &serviceProviderGUID );
|
CLSIDFromString( buff, &serviceProviderGUID );
|
||||||
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
||||||
|
|
||||||
|
@ -4682,7 +4682,7 @@ static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDp
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||||
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, ARRAY_SIZE( buff ));
|
||||||
CLSIDFromString( buff, &serviceProviderGUID );
|
CLSIDFromString( buff, &serviceProviderGUID );
|
||||||
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
||||||
|
|
||||||
|
@ -5811,7 +5811,7 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
|
||||||
dwIndex = 0;
|
dwIndex = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
sizeOfSubKeyName = sizeof(subKeyName) / sizeof(WCHAR);
|
sizeOfSubKeyName = ARRAY_SIZE(subKeyName);
|
||||||
ret_value = RegEnumKeyW(hkResult, dwIndex, subKeyName, sizeOfSubKeyName);
|
ret_value = RegEnumKeyW(hkResult, dwIndex, subKeyName, sizeOfSubKeyName);
|
||||||
dwIndex++;
|
dwIndex++;
|
||||||
}
|
}
|
||||||
|
@ -5837,7 +5837,7 @@ static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA,
|
||||||
WCHAR guidKeyContent[(2 * 16) + 1 + 6 /* This corresponds to '{....-..-..-..-......}' */ ];
|
WCHAR guidKeyContent[(2 * 16) + 1 + 6 /* This corresponds to '{....-..-..-..-......}' */ ];
|
||||||
DWORD sizeOfGuidKeyContent = sizeof(guidKeyContent);
|
DWORD sizeOfGuidKeyContent = sizeof(guidKeyContent);
|
||||||
|
|
||||||
sizeOfSubKeyName = sizeof(subKeyName) / sizeof(WCHAR);
|
sizeOfSubKeyName = ARRAY_SIZE(subKeyName);
|
||||||
ret_value = RegEnumKeyExW(hkResult, dwIndex, subKeyName, &sizeOfSubKeyName,
|
ret_value = RegEnumKeyExW(hkResult, dwIndex, subKeyName, &sizeOfSubKeyName,
|
||||||
NULL, NULL, NULL, &filetime);
|
NULL, NULL, NULL, &filetime);
|
||||||
if (ret_value == ERROR_NO_MORE_ITEMS)
|
if (ret_value == ERROR_NO_MORE_ITEMS)
|
||||||
|
|
|
@ -782,7 +782,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumAddressTypes( IDirectPlayLobby3
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||||
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, ARRAY_SIZE( buff ));
|
||||||
CLSIDFromString( buff, &serviceProviderGUID );
|
CLSIDFromString( buff, &serviceProviderGUID );
|
||||||
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
||||||
|
|
||||||
|
@ -809,7 +809,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumAddressTypes( IDirectPlayLobby3
|
||||||
TRACE( "Found Address Type GUID %s\n", atSubKey );
|
TRACE( "Found Address Type GUID %s\n", atSubKey );
|
||||||
|
|
||||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||||
MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, ARRAY_SIZE( buff ));
|
||||||
CLSIDFromString( buff, &serviceProviderGUID );
|
CLSIDFromString( buff, &serviceProviderGUID );
|
||||||
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
||||||
|
|
||||||
|
@ -950,7 +950,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumLocalApplications( IDirectPlayL
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||||
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, ARRAY_SIZE( buff ));
|
||||||
CLSIDFromString( buff, &serviceProviderGUID );
|
CLSIDFromString( buff, &serviceProviderGUID );
|
||||||
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
/* FIXME: Have I got a memory leak on the serviceProviderGUID? */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue