Michael Stefaniuc : xaudio2/tests: Use the available ARRAY_SIZE() macro.

Alexandre Julliard julliard at winehq.org
Thu May 31 15:56:56 CDT 2018


Module: wine
Branch: master
Commit: 8226f877d98135d3f03825fe6d083130ebb5f393
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8226f877d98135d3f03825fe6d083130ebb5f393

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Wed May 30 01:15:33 2018 +0200

xaudio2/tests: Use the available ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard 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 ccc415a..6609753 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);




More information about the wine-cvs mailing list