Michael Stefaniuc : netapi32/tests: Use the available ARRAY_SIZE() macro.
Alexandre Julliard
julliard at winehq.org
Wed Jun 6 15:21:47 CDT 2018
Module: wine
Branch: master
Commit: 55ef1f4d926d4916e94ce71ba7de5eae85df0b1a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=55ef1f4d926d4916e94ce71ba7de5eae85df0b1a
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Wed Jun 6 00:38:37 2018 +0200
netapi32/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/netapi32/tests/access.c | 8 ++++----
dlls/netapi32/tests/wksta.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c
index f095d77..a284b65 100644
--- a/dlls/netapi32/tests/access.c
+++ b/dlls/netapi32/tests/access.c
@@ -74,7 +74,7 @@ static BOOL init_access_tests(void)
BOOL rc;
user_name[0] = 0;
- dwSize = sizeof(user_name)/sizeof(WCHAR);
+ dwSize = ARRAY_SIZE(user_name);
rc=GetUserNameW(user_name, &dwSize);
if (rc==FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
@@ -84,7 +84,7 @@ static BOOL init_access_tests(void)
ok(rc, "User Name Retrieved\n");
computer_name[0] = 0;
- dwSize = sizeof(computer_name)/sizeof(WCHAR);
+ dwSize = ARRAY_SIZE(computer_name);
ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved\n");
return TRUE;
}
@@ -521,7 +521,7 @@ static void test_DavGetHTTPFromUNCPath(void)
ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
ok( size == 12, "got %u\n", size );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
buf[0] = 0;
size = tests[i].size;
@@ -685,7 +685,7 @@ static void test_DavGetUNCFromHTTPPath(void)
ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
ok( size == 25, "got %u\n", size );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
buf[0] = 0;
size = tests[i].size;
diff --git a/dlls/netapi32/tests/wksta.c b/dlls/netapi32/tests/wksta.c
index 418a1ad..ba4a7f9 100644
--- a/dlls/netapi32/tests/wksta.c
+++ b/dlls/netapi32/tests/wksta.c
@@ -50,7 +50,7 @@ static BOOL init_wksta_tests(void)
BOOL rc;
user_name[0] = 0;
- dwSize = sizeof(user_name)/sizeof(user_name[0]);
+ dwSize = ARRAY_SIZE(user_name);
rc=GetUserNameW(user_name, &dwSize);
if (rc==FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) {
win_skip("GetUserNameW is not implemented\n");
@@ -59,7 +59,7 @@ static BOOL init_wksta_tests(void)
ok(rc, "User Name Retrieved\n");
computer_name[0] = 0;
- dwSize = sizeof(computer_name)/sizeof(computer_name[0]);
+ dwSize = ARRAY_SIZE(computer_name);
ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved\n");
return TRUE;
}
More information about the wine-cvs
mailing list