From dd0e2616a7ed27edef08754ab4778d7ba24a6e48 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 19 Jun 2019 17:50:29 +0200 Subject: [PATCH] winebuild: Use the now available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- tools/winebuild/main.c | 2 +- tools/winebuild/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index d3087160fcb..253957788a6 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -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) )) { diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index dbfe7a4ba74..31a6b283713 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -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; }