Commit 0b788e9a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winetest: Use the ARRAY_SIZE() macro.

parent e4f68323
......@@ -547,7 +547,7 @@ report (enum report_type t, ...)
}
va_start (ap, t);
if (t < sizeof text_funcs / sizeof text_funcs[0]) ret = funcs[t](ap);
if (t < ARRAY_SIZE(text_funcs)) ret = funcs[t](ap);
else report (R_WARNING, "unimplemented report type: %d", t);
va_end (ap);
return ret;
......
......@@ -461,7 +461,7 @@ static void print_language(void)
if (pGetSystemPreferredUILanguages && !running_under_wine())
{
WCHAR langW[32];
ULONG num, size = sizeof(langW)/sizeof(langW[0]);
ULONG num, size = ARRAY_SIZE(langW);
if (pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &num, langW, &size))
{
char lang[32], *p = lang;
......@@ -1263,7 +1263,7 @@ int main( int argc, char *argv[] )
exit (0);
}
else if ((argv[i][0] != '-' && argv[i][0] != '/') || argv[i][2]) {
if (nb_filters == sizeof(filters)/sizeof(filters[0]))
if (nb_filters == ARRAY_SIZE(filters))
{
report (R_ERROR, "Too many test filters specified");
exit (2);
......
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