winetest: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e4f68323fc
commit
0b788e9a72
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue