[PATCH] msctf/tests: Use the available ARRAY_SIZE() macro

Michael Stefaniuc mstefani at winehq.org
Sun Jun 3 18:07:46 CDT 2018


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 dlls/msctf/tests/inputprocessor.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c
index 8a02f95117..4a52432aa5 100644
--- a/dlls/msctf/tests/inputprocessor.c
+++ b/dlls/msctf/tests/inputprocessor.c
@@ -981,7 +981,8 @@ static void test_Register(void)
     ok(SUCCEEDED(hr),"Unable to register COM for TextService\n");
     hr = ITfInputProcessorProfiles_Register(g_ipp, &CLSID_FakeService);
     ok(SUCCEEDED(hr),"Unable to register text service(%x)\n",hr);
-    hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid, &CLSID_FakeService, szDesc, sizeof(szDesc)/sizeof(WCHAR), szFile, sizeof(szFile)/sizeof(WCHAR), 1);
+    hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid,
+            &CLSID_FakeService, szDesc, ARRAY_SIZE(szDesc), szFile, ARRAY_SIZE(szFile), 1);
     ok(SUCCEEDED(hr),"Unable to add Language Profile (%x)\n",hr);
 }
 
@@ -2088,7 +2089,7 @@ static void enum_compartments(ITfCompartmentMgr *cmpmgr, REFGUID present, REFGUI
         {
             WCHAR str[50];
             CHAR strA[50];
-            StringFromGUID2(&g,str,sizeof(str)/sizeof(str[0]));
+            StringFromGUID2(&g,str,ARRAY_SIZE(str));
             WideCharToMultiByte(CP_ACP,0,str,-1,strA,sizeof(strA),0,0);
             trace("found %s\n",strA);
             if (present && IsEqualGUID(present,&g))
-- 
2.14.4




More information about the wine-devel mailing list