netapi32/tests: Fix the size passed to GetUserNameW() and GetComputerNameW() (Coverity).

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-01-12 14:27:06 -06:00 committed by Alexandre Julliard
parent 142585a122
commit 8341b51bf6
2 changed files with 4 additions and 4 deletions

View File

@ -494,10 +494,10 @@ START_TEST(access)
pDavGetHTTPFromUNCPath = (void*)GetProcAddress(hnetapi32, "DavGetHTTPFromUNCPath");
pDavGetUNCFromHTTPPath = (void*)GetProcAddress(hnetapi32, "DavGetUNCFromHTTPPath");
size = sizeof(user_name);
size = ARRAY_SIZE(user_name);
ret = GetUserNameW(user_name, &size);
ok(ret, "Failed to get user name, error %u.\n", GetLastError());
size = sizeof(computer_name);
size = ARRAY_SIZE(computer_name);
ret = GetComputerNameW(computer_name, &size);
ok(ret, "Failed to get computer name, error %u.\n", GetLastError());

View File

@ -175,10 +175,10 @@ START_TEST(wksta)
pNetpGetComputerName = (void *)GetProcAddress(GetModuleHandleA("netapi32.dll"), "NetpGetComputerName");
size = sizeof(user_name);
size = ARRAY_SIZE(user_name);
ret = GetUserNameW(user_name, &size);
ok(ret, "Failed to get user name, error %u.\n", GetLastError());
size = sizeof(computer_name);
size = ARRAY_SIZE(computer_name);
ret = GetComputerNameW(computer_name, &size);
ok(ret, "Failed to get computer name, error %u.\n", GetLastError());