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

Alexandre Julliard julliard at winehq.org
Mon Jun 4 16:26:23 CDT 2018


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Sat Jun  2 01:54:26 2018 +0200

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

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/propsys/tests/propsys.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c
index a6c7023..e899ff9 100644
--- a/dlls/propsys/tests/propsys.c
+++ b/dlls/propsys/tests/propsys.c
@@ -133,7 +133,7 @@ static void test_PSStringFromPropertyKey(void)
 
     int i;
 
-    for (i = 0; i < sizeof(testcases)/sizeof(testcases[0]); i++)
+    for (i = 0; i < ARRAY_SIZE(testcases); i++)
     {
         if (testcases[i].psz)
             memcpy(testcases[i].psz, fillerW, PKEYSTR_MAX * sizeof(WCHAR));
@@ -413,7 +413,7 @@ static void test_PSPropertyKeyFromString(void)
 
     int i;
 
-    for (i = 0; i < sizeof(testcases)/sizeof(testcases[0]); i++)
+    for (i = 0; i < ARRAY_SIZE(testcases); i++)
     {
         if (testcases[i].pkey)
             *testcases[i].pkey = out_init;
@@ -480,7 +480,7 @@ static void test_InitPropVariantFromGUIDAsString(void)
         InitVariantFromGUIDAsString(&IID_NULL, NULL);
     }
 
-    for(i=0; i<sizeof(testcases)/sizeof(testcases[0]); i++) {
+    for(i=0; i < ARRAY_SIZE(testcases); i++) {
         memset(&propvar, 0, sizeof(PROPVARIANT));
         hres = InitPropVariantFromGUIDAsString(testcases[i].guid, &propvar);
         ok(hres == S_OK, "%d) InitPropVariantFromGUIDAsString returned %x\n", i, hres);




More information about the wine-cvs mailing list