[PATCH] msvcp90: Use the ARRAY_SIZE() macro.

Mathew Hodson mathew.hodson at gmail.com
Wed Jul 18 21:04:17 CDT 2018


Signed-off-by: Mathew Hodson <mathew.hodson at gmail.com>
---
 dlls/msvcp90/misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c
index b9fd9d0..a1bec86 100644
--- a/dlls/msvcp90/misc.c
+++ b/dlls/msvcp90/misc.c
@@ -391,7 +391,7 @@ unsigned short __cdecl wctype(const char *property)
     };
     unsigned int i;
 
-    for(i=0; i<sizeof(properties)/sizeof(properties[0]); i++)
+    for(i = 0; i < ARRAY_SIZE(properties); i++)
         if(!strcmp(property, properties[i].name))
             return properties[i].mask;
 
@@ -2440,7 +2440,7 @@ void __thiscall _vector_base_v4__Internal_throw_exception(void/*_vector_base_v4*
 
     TRACE("(%p %lu)\n", this, idx);
 
-    if(idx < sizeof(exceptions)/sizeof(exceptions[0]))
+    if(idx < ARRAY_SIZE(exceptions))
         throw_exception(exceptions[idx].type, exceptions[idx].msg);
 }
 #endif
@@ -2463,7 +2463,7 @@ const char* __cdecl _Syserror_map(int err)
 
     TRACE("(%d)\n", err);
 
-    for(i=0; i<sizeof(syserror_map)/sizeof(syserror_map[0]); i++)
+    for(i = 0; i < ARRAY_SIZE(syserror_map); i++)
     {
         if(syserror_map[i].err == err)
             return syserror_map[i].str;
-- 
2.7.4




More information about the wine-devel mailing list