From 41623d621657b238dbb61cf8a619b89a22bcd5d9 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 7 Jun 2018 23:44:37 +0200 Subject: [PATCH] ieframe/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/ieframe/tests/intshcut.c | 2 +- dlls/ieframe/tests/webbrowser.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ieframe/tests/intshcut.c b/dlls/ieframe/tests/intshcut.c index 0959a618807..803e7ec60e9 100644 --- a/dlls/ieframe/tests/intshcut.c +++ b/dlls/ieframe/tests/intshcut.c @@ -331,7 +331,7 @@ static void test_Load(void) GetTempPathW(MAX_PATH, file_path); lstrcatW(file_path, test_urlW); - for(test = load_tests; test < load_tests + sizeof(load_tests)/sizeof(*load_tests); test++) { + for(test = load_tests; test < load_tests + ARRAY_SIZE(load_tests); test++) { IPropertySetStorage *propsetstorage; IPropertyStorage *propstorage; PROPVARIANT v; diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c index ca2a13162bb..706d5071a9c 100644 --- a/dlls/ieframe/tests/webbrowser.c +++ b/dlls/ieframe/tests/webbrowser.c @@ -2167,7 +2167,7 @@ static void test_EnumVerbs(IWebBrowser2 *wb) fetched = 0xdeadbeef; memset(verbs, 0xa, sizeof(verbs)); verbs[1].lVerb = 0xdeadbeef; - hres = IEnumOLEVERB_Next(enum_verbs, sizeof(verbs)/sizeof(*verbs), verbs, &fetched); + hres = IEnumOLEVERB_Next(enum_verbs, ARRAY_SIZE(verbs), verbs, &fetched); ok(hres == S_OK, "Next failed: %08x\n", hres); ok(!fetched, "fetched = %d\n", fetched); /* Although fetched==0, an element is returned. */ @@ -2184,12 +2184,12 @@ static void test_EnumVerbs(IWebBrowser2 *wb) fetched = 0xdeadbeef; memset(verbs, 0xa, sizeof(verbs)); verbs[0].lVerb = 0xdeadbeef; - hres = IEnumOLEVERB_Next(enum_verbs, sizeof(verbs)/sizeof(*verbs), verbs, &fetched); + hres = IEnumOLEVERB_Next(enum_verbs, ARRAY_SIZE(verbs), verbs, &fetched); todo_wine ok(hres == S_OK, "Next failed: %08x\n", hres); todo_wine ok(fetched == 1, "fetched = %d\n", fetched); todo_wine ok(verbs[0].lVerb != 0xdeadbeef, "verbs[0].lVerb = %x\n", verbs[0].lVerb); - hres = IEnumOLEVERB_Next(enum_verbs, sizeof(verbs)/sizeof(*verbs), verbs, &fetched); + hres = IEnumOLEVERB_Next(enum_verbs, ARRAY_SIZE(verbs), verbs, &fetched); ok(hres == S_FALSE, "Next failed: %08x\n", hres); ok(!fetched, "fetched = %d\n", fetched);