[PATCH] xaudio2/tests: Use the available ARRAY_SIZE() macro

Michael Stefaniuc mstefani at winehq.org
Tue May 29 18:15:33 CDT 2018


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 dlls/xaudio2_7/tests/xaudio2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c
index ccc415afaa..66097532c5 100644
--- a/dlls/xaudio2_7/tests/xaudio2.c
+++ b/dlls/xaudio2_7/tests/xaudio2.c
@@ -1004,7 +1004,7 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
     }
 
     if(pCreateFX){
-        for(i = 0; i < sizeof(const_clsids) / sizeof(*const_clsids); ++i){
+        for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){
             hr = pCreateFX(const_clsids[i].clsid, &fx_unk);
             todo_wine_if(const_clsids[i].todo)
                 ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i].clsid), hr);
@@ -1090,7 +1090,7 @@ static void test_xapo_creation_modern(const char *module)
     }
 
     if(pCreateFX){
-        for(i = 0; i < sizeof(const_clsids) / sizeof(*const_clsids); ++i){
+        for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){
             hr = pCreateFX(const_clsids[i].clsid, &fx_unk, NULL, 0);
             todo_wine_if(const_clsids[i].todo)
                 ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i].clsid), hr);
-- 
2.14.3




More information about the wine-devel mailing list