secure32/tests: Use the available ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2018-05-30 21:15:46 +02:00 committed by Alexandre Julliard
parent 5085f4f9c1
commit 323198df10
2 changed files with 8 additions and 8 deletions

View File

@ -1165,7 +1165,7 @@ static void testSignSeal(void)
trace("Testing with more than one buffer.\n");
crypt.cBuffers = sizeof(complex_data)/sizeof(complex_data[0]);
crypt.cBuffers = ARRAY_SIZE(complex_data);
crypt.pBuffers = complex_data;
complex_data[0].BufferType = SECBUFFER_DATA|SECBUFFER_READONLY_WITH_CHECKSUM;
@ -1436,7 +1436,7 @@ static void test_cred_multiple_use(void)
getSecError(ret));
buffer_desc.ulVersion = SECBUFFER_VERSION;
buffer_desc.cBuffers = sizeof(buffers)/sizeof(buffers[0]);
buffer_desc.cBuffers = ARRAY_SIZE(buffers);
buffer_desc.pBuffers = buffers;
ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION,
@ -1487,7 +1487,7 @@ static void test_null_auth_data(void)
buffers[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, buffers[0].cbBuffer);
buffer_desc.ulVersion = SECBUFFER_VERSION;
buffer_desc.cBuffers = sizeof(buffers)/sizeof(buffers[0]);
buffer_desc.cBuffers = ARRAY_SIZE(buffers);
buffer_desc.pBuffers = buffers;
size = sizeof(user);

View File

@ -67,7 +67,7 @@ static void testGetComputerObjectNameA(void)
BOOLEAN rc;
UINT i;
for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) {
for (i = 0; i < ARRAY_SIZE(formats); i++) {
size = 0;
SetLastError(0xdeadbeef);
rc = pGetComputerObjectNameA(formats[i], NULL, &size);
@ -112,7 +112,7 @@ static void testGetComputerObjectNameW(void)
BOOLEAN rc;
UINT i;
for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) {
for (i = 0; i < ARRAY_SIZE(formats); i++) {
size = 0;
SetLastError(0xdeadbeef);
rc = pGetComputerObjectNameW(formats[i], NULL, &size);
@ -134,7 +134,7 @@ static void testGetComputerObjectNameW(void)
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) continue;
size = sizeof(nameW)/sizeof(nameW[0]);
size = ARRAY_SIZE(nameW);
SetLastError(0xdeadbeef);
rc = pGetComputerObjectNameW(formats[i], nameW, &size);
switch (formats[i])
@ -158,7 +158,7 @@ static void testGetUserNameExA(void)
BOOLEAN rc;
UINT i;
for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) {
for (i = 0; i < ARRAY_SIZE(formats); i++) {
size = sizeof(name);
ZeroMemory(name, sizeof(name));
rc = pGetUserNameExA(formats[i], name, &size);
@ -205,7 +205,7 @@ static void testGetUserNameExW(void)
BOOLEAN rc;
UINT i;
for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) {
for (i = 0; i < ARRAY_SIZE(formats); i++) {
size = sizeof(nameW);
ZeroMemory(nameW, sizeof(nameW));
rc = pGetUserNameExW(formats[i], nameW, &size);