[PATCH] wldap32: Use the ARRAY_SIZE() macro

Michael Stefaniuc mstefani at winehq.org
Thu Aug 9 13:59:37 CDT 2018


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 dlls/wldap32/error.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wldap32/error.c b/dlls/wldap32/error.c
index 2e09e9e399..fbbd124d23 100644
--- a/dlls/wldap32/error.c
+++ b/dlls/wldap32/error.c
@@ -303,7 +303,7 @@ ULONG CDECL LdapMapErrorToWin32( ULONG err )
 {
     TRACE( "(0x%08x)\n", err );
 
-    if (err >= sizeof(WLDAP32_errormap)/sizeof(WLDAP32_errormap[0]))
+    if (err >= ARRAY_SIZE( WLDAP32_errormap ))
         return ERROR_DS_GENERIC_ERROR;
     return WLDAP32_errormap[err];
 }
-- 
2.14.4




More information about the wine-devel mailing list