urlmon: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
68cfa7fd03
commit
a2201e8add
@ -409,7 +409,7 @@ static void init_session(void)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for(i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++) {
|
for(i = 0; i < ARRAY_SIZE(object_creation); i++) {
|
||||||
if(object_creation[i].protocol)
|
if(object_creation[i].protocol)
|
||||||
register_namespace(object_creation[i].cf, object_creation[i].clsid,
|
register_namespace(object_creation[i].cf, object_creation[i].clsid,
|
||||||
object_creation[i].protocol, TRUE);
|
object_creation[i].protocol, TRUE);
|
||||||
@ -438,10 +438,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||||
|
|
||||||
for (i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++)
|
for (i = 0; i < ARRAY_SIZE(object_creation); i++)
|
||||||
{
|
{
|
||||||
if (IsEqualGUID(object_creation[i].clsid, rclsid))
|
if (IsEqualGUID(object_creation[i].clsid, rclsid))
|
||||||
return IClassFactory_QueryInterface(object_creation[i].cf, riid, ppv);
|
return IClassFactory_QueryInterface(object_creation[i].cf, riid, ppv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user