Michael Stefaniuc : serialui/tests: Use the available ARRAY_SIZE() macro.

Alexandre Julliard julliard at winehq.org
Thu May 31 15:56:55 CDT 2018


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Wed May 30 21:15:45 2018 +0200

serialui/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/serialui/tests/confdlg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/serialui/tests/confdlg.c b/dlls/serialui/tests/confdlg.c
index 4606a75..bd541cd 100644
--- a/dlls/serialui/tests/confdlg.c
+++ b/dlls/serialui/tests/confdlg.c
@@ -165,7 +165,7 @@ static void test_drvCommConfigDialogW(void)
     /* test ports "com1" - "com4" */
     for (i = 1; i < 5 ; i++) {
         sprintf(bufferA, fmt_comA, i);
-        MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) );
+        MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, ARRAY_SIZE(bufferW));
         len = sizeof(pCC);
         ZeroMemory(pCC, sizeof(pCC));
         SetLastError(0xdeadbeef);
@@ -346,7 +346,7 @@ static void test_drvGetDefaultCommConfigW(void)
     /* test ports "com0" - "com10" */
     for (i = 0; i < 11 ; i++) {
         sprintf(bufferA, fmt_comA, i);
-        MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) );
+        MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, ARRAY_SIZE(bufferW));
         len = sizeof(pCC);
         ZeroMemory(pCC, sizeof(pCC));
         SetLastError(0xdeadbeef);




More information about the wine-cvs mailing list