From 8261609197ed345a5e50d06420e90bedc1a4d42a Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 30 May 2018 21:15:34 +0200 Subject: [PATCH] wbemdisp/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/wbemdisp/tests/wbemdisp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wbemdisp/tests/wbemdisp.c b/dlls/wbemdisp/tests/wbemdisp.c index 0c426c569a3..171a91edb4e 100644 --- a/dlls/wbemdisp/tests/wbemdisp.c +++ b/dlls/wbemdisp/tests/wbemdisp.c @@ -56,10 +56,10 @@ static void test_ParseDisplayName(void) ULONG eaten; } tests[] = { - { name1, S_OK, &IID_ISWbemServices, sizeof(name1)/sizeof(name1[0]) - 1 }, - { name2, S_OK, &IID_ISWbemServices, sizeof(name2)/sizeof(name2[0]) - 1 }, - { name3, S_OK, &IID_ISWbemObject, sizeof(name3)/sizeof(name3[0]) - 1 }, - { name4, S_OK, &IID_ISWbemObject, sizeof(name4)/sizeof(name4[0]) - 1 } + { name1, S_OK, &IID_ISWbemServices, ARRAY_SIZE( name1 ) - 1 }, + { name2, S_OK, &IID_ISWbemServices, ARRAY_SIZE( name2 ) - 1 }, + { name3, S_OK, &IID_ISWbemObject, ARRAY_SIZE( name3 ) - 1 }, + { name4, S_OK, &IID_ISWbemObject, ARRAY_SIZE( name4 ) - 1 } }; IParseDisplayName *displayname; IBindCtx *ctx; @@ -79,7 +79,7 @@ static void test_ParseDisplayName(void) hr = CreateBindCtx( 0, &ctx ); ok( hr == S_OK, "got %x\n", hr ); - for (i =0; i < sizeof(tests)/sizeof(tests[0]); i++) + for (i =0; i < ARRAY_SIZE( tests ); i++) { str = SysAllocString( tests[i].name ); eaten = 0xdeadbeef;