Michael Stefaniuc : propsys/tests: Use the available ARRAY_SIZE() macro.
Module: wine Branch: master Commit: fddb389641f228cb4cbfcb88f7512909ec62115e URL: https://source.winehq.org/git/wine.git/?a=commit;h=fddb389641f228cb4cbfcb88f... Author: Michael Stefaniuc <mstefani(a)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(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)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);
participants (1)
-
Alexandre Julliard