From 2c6a9c87daa9dbf45da7fc171b1aa56466b565ce Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 9 Aug 2018 20:59:36 +0200 Subject: [PATCH] wlanapi: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/wlanapi/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wlanapi/main.c b/dlls/wlanapi/main.c index b7646810066..f0a0091d4d5 100644 --- a/dlls/wlanapi/main.c +++ b/dlls/wlanapi/main.c @@ -49,7 +49,7 @@ static struct wine_wlan* handle_index(HANDLE handle) { ULONG_PTR i = (ULONG_PTR)handle - 1; - if (i < sizeof(handle_table) / sizeof(handle_table[0]) && handle_table[i].magic == WLAN_MAGIC) + if (i < ARRAY_SIZE(handle_table) && handle_table[i].magic == WLAN_MAGIC) return &handle_table[i]; return NULL; @@ -59,7 +59,7 @@ static HANDLE handle_new(struct wine_wlan **entry) { ULONG_PTR i; - for (i = 0; i < sizeof(handle_table) / sizeof(handle_table[0]); i++) + for (i = 0; i < ARRAY_SIZE(handle_table); i++) { if (handle_table[i].magic == 0) {