From 84d4887f50d54f5872f25e74b095a0d71f96b6b5 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 20 Jul 2018 21:45:55 +0200 Subject: [PATCH] d3dxof: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc Signed-off-by: Henri Verbeet Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- dlls/d3dxof/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dxof/main.c b/dlls/d3dxof/main.c index 572f38831f8..385609ace05 100644 --- a/dlls/d3dxof/main.c +++ b/dlls/d3dxof/main.c @@ -195,13 +195,13 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) && ! IsEqualGUID( &IID_IUnknown, riid) ) return E_NOINTERFACE; - 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)) break; } - if (i == sizeof(object_creation)/sizeof(object_creation[0])) + if (i == ARRAY_SIZE(object_creation)) { FIXME("%s: no class found.\n", debugstr_guid(rclsid)); return CLASS_E_CLASSNOTAVAILABLE;