Module: wine Branch: master Commit: a1fb71c562c720c75070195b222afc7df5af8da3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a1fb71c562c720c75070195b2...
Author: Mathew Hodson mathew.hodson@gmail.com Date: Wed Jul 18 22:04:17 2018 -0400
msvcp90: Use the ARRAY_SIZE() macro.
Signed-off-by: Mathew Hodson mathew.hodson@gmail.com Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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;