Michael Stefaniuc : msctf/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: 5da1f82620d8e4d7fa93a94c97e5340ad7928a79
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5da1f82620d8e4d7fa93a94c97e5340ad7928a79

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Mon Jun  4 01:07:46 2018 +0200

msctf/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/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 8a02f95..4a52432 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))




More information about the wine-cvs mailing list