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

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

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

diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c
index 041afbf..fc067d9 100644
--- a/dlls/mpr/tests/mpr.c
+++ b/dlls/mpr/tests/mpr.c
@@ -60,7 +60,7 @@ static void test_WNetGetUniversalName(void)
             ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
                 "(%s) WNetGetUniversalNameW gave wrong error: %u\n", driveA, ret);
 
-        fail_size = sizeof(driveA) / sizeof(char) - 1;
+        fail_size = ARRAY_SIZE(driveA) - 1;
         ret = WNetGetUniversalNameA(driveA, UNIVERSAL_NAME_INFO_LEVEL,
                 buffer, &fail_size);
         if(drive_type == DRIVE_REMOTE)
@@ -132,7 +132,7 @@ static void test_WNetGetRemoteName(void)
             ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
                 "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
 
-        fail_size = sizeof(driveA) / sizeof(char) - 1;
+        fail_size = ARRAY_SIZE(driveA) - 1;
         ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
                 buffer, &fail_size);
         if(drive_type == DRIVE_REMOTE)




More information about the wine-cvs mailing list