Commit cc906096 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent c07f18fb
......@@ -596,7 +596,7 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
#undef VTBL_PROXY_TEST
#undef VTBL_PROXY_TEST_NOT_ZERO
for (i = 0; i < sizeof(interfaces)/sizeof(interfaces[0]); i++)
for (i = 0; i < ARRAY_SIZE(interfaces); i++)
ok( proxy_vtbl[i]->header.piid == interfaces[i],
"wrong proxy %u iid %p/%p\n", i, proxy_vtbl[i]->header.piid, interfaces[i] );
......
......@@ -149,10 +149,8 @@ static void TestDceErrorInqText (void)
*/
DWORD dwCount;
dwCount = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, RPC_S_NOT_RPC_ERROR, 0, bufferInvalid,
sizeof(bufferInvalid)/sizeof(bufferInvalid[0]), NULL);
dwCount = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
RPC_S_NOT_RPC_ERROR, 0, bufferInvalid, ARRAY_SIZE(bufferInvalid), NULL);
/* A random sample of DceErrorInqText */
/* 0 is success */
......
......@@ -313,7 +313,7 @@ void __cdecl s_get_number_array(int x[20], int *n)
{
int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
memcpy(x, c, sizeof(c));
*n = sizeof(c)/sizeof(c[0]);
*n = ARRAY_SIZE(c);
}
int __cdecl s_sum_cs(cs_t *cs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment