Michael Stefaniuc : rpcrt4/tests: Use the available ARRAY_SIZE() macro.
Alexandre Julliard
julliard at winehq.org
Mon Jun 11 13:10:50 CDT 2018
Module: wine
Branch: master
Commit: cc906096c3969980eed8195f6eedcff1ff0a1103
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cc906096c3969980eed8195f6eedcff1ff0a1103
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Fri Jun 8 22:19:03 2018 +0200
rpcrt4/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/rpcrt4/tests/cstub.c | 2 +-
dlls/rpcrt4/tests/rpc.c | 6 ++----
dlls/rpcrt4/tests/server.c | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c
index 606107f..7bed308 100644
--- a/dlls/rpcrt4/tests/cstub.c
+++ b/dlls/rpcrt4/tests/cstub.c
@@ -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] );
diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c
index f026e99..c9f2a4b 100644
--- a/dlls/rpcrt4/tests/rpc.c
+++ b/dlls/rpcrt4/tests/rpc.c
@@ -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 */
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index dfad1ed..b35b71b 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -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)
More information about the wine-cvs
mailing list