winebuild: Use the now available ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Michael Stefaniuc 2019-06-19 17:50:29 +02:00 committed by Alexandre Julliard
parent ec29d40e4e
commit dd0e2616a7
2 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ static void set_target( const char *target )
/* get the OS part */
target_platform = PLATFORM_UNSPECIFIED; /* default value */
for (i = 0; i < sizeof(platform_names)/sizeof(platform_names[0]); i++)
for (i = 0; i < ARRAY_SIZE(platform_names); i++)
{
if (!strncmp( platform_names[i].name, platform, strlen(platform_names[i].name) ))
{

View File

@ -943,7 +943,7 @@ int get_cpu_from_name( const char *name )
{
unsigned int i;
for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++)
for (i = 0; i < ARRAY_SIZE(cpu_names); i++)
if (!strcmp( cpu_names[i].name, name )) return cpu_names[i].cpu;
return -1;
}