Marcus Meissner : mshtml: Use ARRAY_SIZE instead of sizeof in MultiByteToWideChar.

Alexandre Julliard julliard at winehq.org
Mon Feb 3 15:06:06 CST 2020


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

Author: Marcus Meissner <meissner at suse.de>
Date:   Mon Feb  3 11:45:48 2020 +0100

mshtml: Use ARRAY_SIZE instead of sizeof in MultiByteToWideChar.

Signed-off-by: Marcus Meissner <meissner at suse.de>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/tests/dom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 1c4a54cf63..2b0a5cde95 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -6370,7 +6370,7 @@ static void test_navigator(IHTMLDocument2 *doc)
     hres = ObtainUserAgentString(0, bufa, &size);
     ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres);
 
-    MultiByteToWideChar(CP_ACP, 0, bufa, size, buf, sizeof(buf));
+    MultiByteToWideChar(CP_ACP, 0, bufa, size, buf, ARRAY_SIZE(buf));
 
     bstr = NULL;
     hres = IOmNavigator_get_userAgent(navigator, &bstr);
@@ -6390,7 +6390,7 @@ static void test_navigator(IHTMLDocument2 *doc)
 
     hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, ua, sizeof(ua), 0);
     ok(hres == S_OK, "UrlMkSetSessionOption failed: %08x\n", hres);
-    MultiByteToWideChar(CP_ACP, 0, ua, -1, buf, sizeof(buf));
+    MultiByteToWideChar(CP_ACP, 0, ua, -1, buf, ARRAY_SIZE(buf));
 
     hres = IOmNavigator_get_appVersion(navigator, &bstr);
     ok(hres == S_OK, "get_appVersion failed: %08x\n", hres);




More information about the wine-cvs mailing list