msvc90: Use the ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2018-08-16 20:19:28 +02:00 committed by Alexandre Julliard
parent 30905781aa
commit 93b680510a
3 changed files with 7 additions and 7 deletions

View file

@ -3237,10 +3237,10 @@ FILE* __cdecl _Fiopen_wchar(const wchar_t *name, int mode, int prot)
TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
for(mode_idx=0; mode_idx<ARRAY_SIZE(str_mode); mode_idx++)
if(str_mode[mode_idx].mode == real_mode)
break;
if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
if(mode_idx == ARRAY_SIZE(str_mode))
return NULL;
if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
@ -3469,7 +3469,7 @@ int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
return c;
buf_next = buf;
for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
for(i=0; i < ARRAY_SIZE(buf); i++) {
buf[i] = c;
switch(codecvt_char_in(this->cvt, &this->state, buf_next,
@ -4112,7 +4112,7 @@ unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
return fgetwc(this->file);
buf_next = buf;
for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
for(i=0; i < ARRAY_SIZE(buf); i++) {
if((c = fgetc(this->file)) == EOF)
return WEOF;
buf[i] = c;

View file

@ -786,11 +786,11 @@ int __cdecl _Getdateorder(void)
#if _MSVCP_VER < 110
if(!GetLocaleInfoW(___lc_handle_func()[LC_TIME], LOCALE_ILDATE,
date_fmt, sizeof(date_fmt)/sizeof(*date_fmt)))
date_fmt, ARRAY_SIZE(date_fmt)))
return DATEORDER_no_order;
#else
if(!GetLocaleInfoEx(___lc_locale_name_func()[LC_TIME], LOCALE_ILDATE,
date_fmt, sizeof(date_fmt)/sizeof(*date_fmt)))
date_fmt, ARRAY_SIZE(date_fmt)))
return DATEORDER_no_order;
#endif

View file

@ -1781,7 +1781,7 @@ typedef struct __Concurrent_vector_base_v4
void **segment;
} _Concurrent_vector_base_v4;
#define STORAGE_SIZE (sizeof(this->storage) / sizeof(this->storage[0]))
#define STORAGE_SIZE ARRAY_SIZE(this->storage)
#define SEGMENT_SIZE (sizeof(void*) * 8)
typedef struct compact_block