Michael Stefaniuc : oledlg/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: f10136a9e3dae50a31b6469b09359ce80c294821
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f10136a9e3dae50a31b6469b09359ce80c294821
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Sat Jun 2 01:54:22 2018 +0200
oledlg/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/oledlg/tests/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/oledlg/tests/main.c b/dlls/oledlg/tests/main.c
index 5d452f1..cef55eb 100644
--- a/dlls/oledlg/tests/main.c
+++ b/dlls/oledlg/tests/main.c
@@ -385,7 +385,7 @@ static void test_OleUIAddVerbMenu(void)
info.cbSize = sizeof(info);
info.fMask = MIIM_STATE|MIIM_ID|MIIM_STRING|MIIM_SUBMENU;
info.dwTypeData = buffW;
- info.cch = sizeof(buffW)/sizeof(WCHAR);
+ info.cch = ARRAY_SIZE(buffW);
ret = GetMenuItemInfoW(hMenu, 3, TRUE, &info);
ok(ret, "got %d\n", ret);
ok(info.fState == MF_GRAYED, "got state 0x%08x\n", info.fState);
@@ -406,7 +406,7 @@ static void test_OleUIAddVerbMenu(void)
info.cbSize = sizeof(info);
info.fMask = MIIM_STRING|MIIM_STATE|MIIM_SUBMENU;
info.dwTypeData = buffW;
- info.cch = sizeof(buffW)/sizeof(WCHAR);
+ info.cch = ARRAY_SIZE(buffW);
ret = GetMenuItemInfoW(hMenu, 4, TRUE, &info);
ok(ret, "got %d\n", ret);
/* Item string contains verb, usertype and localized string for 'Object' word,
@@ -462,7 +462,7 @@ static void test_OleUIAddVerbMenu(void)
ok(ret, "got %d\n", ret);
buffW[0] = 0;
- GetMenuStringW(hMenu, 0, buffW, sizeof(buffW)/sizeof(buffW[0]), MF_BYPOSITION);
+ GetMenuStringW(hMenu, 0, buffW, ARRAY_SIZE(buffW), MF_BYPOSITION);
ok(!lstrcmpW(buffW, cadabraW), "got %s\n", wine_dbgstr_w(buffW));
verbmenu = NULL;
@@ -475,7 +475,7 @@ static void test_OleUIAddVerbMenu(void)
info.fMask = MIIM_STRING|MIIM_STATE;
buffW[0] = 0;
info.dwTypeData = buffW;
- info.cch = sizeof(buffW)/sizeof(WCHAR);
+ info.cch = ARRAY_SIZE(buffW);
ret = GetMenuItemInfoW(hMenu, 0, TRUE, &info);
ok(ret, "got %d\n", ret);
ok(lstrcmpW(buffW, cadabraW), "got %s\n", wine_dbgstr_w(buffW));
More information about the wine-cvs
mailing list