Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/jscript/array.c | 8 ++++---- dlls/jscript/bool.c | 2 +- dlls/jscript/date.c | 26 +++++++++++++------------- dlls/jscript/decode.c | 10 +++++----- dlls/jscript/dispex.c | 2 +- dlls/jscript/error.c | 6 +++--- dlls/jscript/function.c | 14 +++++++------- dlls/jscript/global.c | 2 +- dlls/jscript/json.c | 2 +- dlls/jscript/jsregexp.c | 10 +++++----- dlls/jscript/jsutils.c | 6 +++--- dlls/jscript/lex.c | 2 +- dlls/jscript/math.c | 4 ++-- dlls/jscript/number.c | 2 +- dlls/jscript/object.c | 4 ++-- dlls/jscript/string.c | 8 ++++---- dlls/jscript/vbarray.c | 2 +- 17 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/dlls/jscript/array.c b/dlls/jscript/array.c index 9c287c9901..e74ca7fe5f 100644 --- a/dlls/jscript/array.c +++ b/dlls/jscript/array.c @@ -1020,7 +1020,7 @@ static HRESULT Array_unshift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsi return hres;
if(argc) { - buf_end = buf + sizeof(buf)/sizeof(WCHAR)-1; + buf_end = buf + ARRAY_SIZE(buf)-1; *buf_end-- = 0; i = length;
@@ -1118,7 +1118,7 @@ static const builtin_prop_t Array_props[] = { static const builtin_info_t Array_info = { JSCLASS_ARRAY, {NULL, NULL,0, Array_get_value}, - sizeof(Array_props)/sizeof(*Array_props), + ARRAY_SIZE(Array_props), Array_props, Array_destructor, Array_on_put @@ -1131,7 +1131,7 @@ static const builtin_prop_t ArrayInst_props[] = { static const builtin_info_t ArrayInst_info = { JSCLASS_ARRAY, {NULL, NULL,0, Array_get_value}, - sizeof(ArrayInst_props)/sizeof(*ArrayInst_props), + ARRAY_SIZE(ArrayInst_props), ArrayInst_props, Array_destructor, Array_on_put @@ -1238,7 +1238,7 @@ static const builtin_prop_t ArrayConstr_props[] = { static const builtin_info_t ArrayConstr_info = { JSCLASS_FUNCTION, DEFAULT_FUNCTION_VALUE, - sizeof(ArrayConstr_props)/sizeof(*ArrayConstr_props), + ARRAY_SIZE(ArrayConstr_props), ArrayConstr_props, NULL, NULL diff --git a/dlls/jscript/bool.c b/dlls/jscript/bool.c index 75c98c2403..2d0b9d0c1b 100644 --- a/dlls/jscript/bool.c +++ b/dlls/jscript/bool.c @@ -121,7 +121,7 @@ static const builtin_prop_t Bool_props[] = { static const builtin_info_t Bool_info = { JSCLASS_BOOLEAN, {NULL, Bool_value, 0}, - sizeof(Bool_props)/sizeof(*Bool_props), + ARRAY_SIZE(Bool_props), Bool_props, NULL, NULL diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 28ad23d644..2676cd1cb1 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -523,10 +523,10 @@ static inline HRESULT date_to_string(DOUBLE time, BOOL show_offset, int offset, lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
week[0] = 0; - GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week, sizeof(week)/sizeof(*week)); + GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week, ARRAY_SIZE(week));
month[0] = 0; - GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month, sizeof(month)/sizeof(*month)); + GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month, ARRAY_SIZE(month));
year = year_from_time(time); if(year<0) { @@ -732,10 +732,10 @@ static inline HRESULT create_utc_string(script_ctx_t *ctx, vdisp_t *jsthis, jsva lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
week[0] = 0; - GetLocaleInfoW(lcid_en, week_ids[(int)week_day(date->time)], week, sizeof(week)/sizeof(*week)); + GetLocaleInfoW(lcid_en, week_ids[(int)week_day(date->time)], week, ARRAY_SIZE(week));
month[0] = 0; - GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(date->time)], month, sizeof(month)/sizeof(*month)); + GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(date->time)], month, ARRAY_SIZE(month));
year = year_from_time(date->time); if(year<0) { @@ -809,10 +809,10 @@ static HRESULT dateobj_to_date_string(DateInstance *date, jsval_t *r) lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
week[0] = 0; - GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week, sizeof(week)/sizeof(*week)); + GetLocaleInfoW(lcid_en, week_ids[(int)week_day(time)], week, ARRAY_SIZE(week));
month[0] = 0; - GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month, sizeof(month)/sizeof(*month)); + GetLocaleInfoW(lcid_en, month_ids[(int)month_from_time(time)], month, ARRAY_SIZE(month));
year = year_from_time(time); if(year<0) { @@ -1983,7 +1983,7 @@ static const builtin_prop_t Date_props[] = { static const builtin_info_t Date_info = { JSCLASS_DATE, {NULL, NULL,0, Date_get_value}, - sizeof(Date_props)/sizeof(*Date_props), + ARRAY_SIZE(Date_props), Date_props, NULL, NULL @@ -2037,7 +2037,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) { LOCALE_SMONTHNAME1, LOCALE_SDAYNAME7, LOCALE_SDAYNAME1, LOCALE_SDAYNAME2, LOCALE_SDAYNAME3, LOCALE_SDAYNAME4, LOCALE_SDAYNAME5, LOCALE_SDAYNAME6 }; - WCHAR *strings[sizeof(string_ids)/sizeof(DWORD)]; + WCHAR *strings[ARRAY_SIZE(string_ids)]; WCHAR *parse; int input_len, parse_len = 0, nest_level = 0, i, size; int year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0; @@ -2088,7 +2088,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
/* FIXME: Cache strings */ lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - for(i=0; i<sizeof(string_ids)/sizeof(DWORD); i++) { + for(i=0; i<ARRAY_SIZE(string_ids); i++) { size = GetLocaleInfoW(lcid_en, string_ids[i], NULL, 0); strings[i] = heap_alloc((size+1)*sizeof(WCHAR)); if(!strings[i]) { @@ -2269,7 +2269,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) { for(size=i; parse[size]>='A' && parse[size]<='Z'; size++); size -= i;
- for(j=0; j<sizeof(string_ids)/sizeof(DWORD); j++) + for(j=0; j<ARRAY_SIZE(string_ids); j++) if(!strncmpiW(&parse[i], strings[j], size)) break;
if(j < 12) { @@ -2277,7 +2277,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) { set_month = TRUE; month = 11-j; } - else if(j == sizeof(string_ids)/sizeof(DWORD)) break; + else if(j == ARRAY_SIZE(string_ids)) break;
i += size; } @@ -2302,7 +2302,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) { *ret = NAN; }
- for(i=0; i<sizeof(string_ids)/sizeof(DWORD); i++) + for(i=0; i<ARRAY_SIZE(string_ids); i++) heap_free(strings[i]); heap_free(parse);
@@ -2522,7 +2522,7 @@ static const builtin_prop_t DateConstr_props[] = { static const builtin_info_t DateConstr_info = { JSCLASS_FUNCTION, DEFAULT_FUNCTION_VALUE, - sizeof(DateConstr_props)/sizeof(*DateConstr_props), + ARRAY_SIZE(DateConstr_props), DateConstr_props, NULL, NULL diff --git a/dlls/jscript/decode.c b/dlls/jscript/decode.c index d402d7c961..ccbd04c05b 100644 --- a/dlls/jscript/decode.c +++ b/dlls/jscript/decode.c @@ -91,7 +91,7 @@ static BOOL decode_dword(const WCHAR *p, DWORD *ret) DWORD i;
for(i=0; i<6; i++) { - if(p[i] >= sizeof(digits)/sizeof(*digits) || digits[p[i]] == 0xff) + if(p[i] >= ARRAY_SIZE(digits) || digits[p[i]] == 0xff) return FALSE; } if(p[6] != '=' || p[7] != '=') @@ -117,10 +117,10 @@ HRESULT decode_source(WCHAR *code) static const WCHAR decode_endW[] = {'^','#','~','@'};
while(*src) { - if(!strncmpW(src, decode_beginW, sizeof(decode_beginW)/sizeof(*decode_beginW))) { + if(!strncmpW(src, decode_beginW, ARRAY_SIZE(decode_beginW))) { DWORD len, i, j=0, csum, s=0;
- src += sizeof(decode_beginW)/sizeof(*decode_beginW); + src += ARRAY_SIZE(decode_beginW);
if(!decode_dword(src, &len)) return JS_E_INVALID_CHAR; @@ -165,9 +165,9 @@ HRESULT decode_source(WCHAR *code) return JS_E_INVALID_CHAR; src += 8;
- if(strncmpW(src, decode_endW, sizeof(decode_endW)/sizeof(*decode_endW))) + if(strncmpW(src, decode_endW, ARRAY_SIZE(decode_endW))) return JS_E_INVALID_CHAR; - src += sizeof(decode_endW)/sizeof(*decode_endW); + src += ARRAY_SIZE(decode_endW); }else { *dst++ = *src++; } diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 65ca47a515..bc02aa4d67 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -1290,7 +1290,7 @@ HRESULT disp_call_value(script_ctx_t *ctx, IDispatch *disp, IDispatch *jsthis, W dp.rgdispidNamedArgs = NULL; }
- if(dp.cArgs > sizeof(buf)/sizeof(*buf)) { + if(dp.cArgs > ARRAY_SIZE(buf)) { dp.rgvarg = heap_alloc(dp.cArgs*sizeof(VARIANT)); if(!dp.rgvarg) { if(dispex) diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index 8cf52f00eb..ef855dce30 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -144,7 +144,7 @@ static const builtin_prop_t Error_props[] = { static const builtin_info_t Error_info = { JSCLASS_ERROR, {NULL, Error_value, 0}, - sizeof(Error_props)/sizeof(*Error_props), + ARRAY_SIZE(Error_props), Error_props, NULL, NULL @@ -348,7 +348,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t *object_prototype) jsstr_t *str; HRESULT hres;
- for(i=0; i < sizeof(names)/sizeof(names[0]); i++) { + for(i=0; i < ARRAY_SIZE(names); i++) { hres = alloc_error(ctx, i==0 ? object_prototype : NULL, NULL, &err); if(FAILED(hres)) return hres; @@ -385,7 +385,7 @@ static HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str, j return error;
buf[0] = '\0'; - LoadStringW(jscript_hinstance, HRESULT_CODE(error), buf, sizeof(buf)/sizeof(WCHAR)); + LoadStringW(jscript_hinstance, HRESULT_CODE(error), buf, ARRAY_SIZE(buf));
if(str) pos = strchrW(buf, '|'); if(pos) { diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 0aae300d01..9795f77e90 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -304,12 +304,12 @@ static HRESULT function_to_string(FunctionInstance *function, jsstr_t **ret) WCHAR *ptr;
name_len = strlenW(function->name); - str = jsstr_alloc_buf((sizeof(native_prefixW)+sizeof(native_suffixW))/sizeof(WCHAR) + name_len, &ptr); + str = jsstr_alloc_buf(ARRAY_SIZE(native_prefixW) + ARRAY_SIZE(native_suffixW) + name_len, &ptr); if(!str) return E_OUTOFMEMORY;
memcpy(ptr, native_prefixW, sizeof(native_prefixW)); - memcpy(ptr += sizeof(native_prefixW)/sizeof(WCHAR), function->name, name_len*sizeof(WCHAR)); + memcpy(ptr += ARRAY_SIZE(native_prefixW), function->name, name_len*sizeof(WCHAR)); memcpy(ptr + name_len, native_suffixW, sizeof(native_suffixW)); }else { str = jsstr_alloc_len(function->func_code->source, function->func_code->source_len); @@ -593,7 +593,7 @@ static const builtin_prop_t Function_props[] = { static const builtin_info_t Function_info = { JSCLASS_FUNCTION, DEFAULT_FUNCTION_VALUE, - sizeof(Function_props)/sizeof(*Function_props), + ARRAY_SIZE(Function_props), Function_props, Function_destructor, NULL @@ -607,7 +607,7 @@ static const builtin_prop_t FunctionInst_props[] = { static const builtin_info_t FunctionInst_info = { JSCLASS_FUNCTION, DEFAULT_FUNCTION_VALUE, - sizeof(FunctionInst_props)/sizeof(*FunctionInst_props), + ARRAY_SIZE(FunctionInst_props), FunctionInst_props, Function_destructor, NULL @@ -764,11 +764,11 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc, jsval_t *arg }
if(SUCCEEDED(hres)) { - len += (sizeof(function_anonymousW) + sizeof(function_beginW) + sizeof(function_endW)) / sizeof(WCHAR); + len += ARRAY_SIZE(function_anonymousW) + ARRAY_SIZE(function_beginW) + ARRAY_SIZE(function_endW); str = heap_alloc(len*sizeof(WCHAR)); if(str) { memcpy(str, function_anonymousW, sizeof(function_anonymousW)); - ptr = str + sizeof(function_anonymousW)/sizeof(WCHAR); + ptr = str + ARRAY_SIZE(function_anonymousW); if(argc > 1) { while(1) { ptr += jsstr_flush(params[j], ptr); @@ -779,7 +779,7 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc, jsval_t *arg } } memcpy(ptr, function_beginW, sizeof(function_beginW)); - ptr += sizeof(function_beginW)/sizeof(WCHAR); + ptr += ARRAY_SIZE(function_beginW); if(argc) ptr += jsstr_flush(params[argc-1], ptr); memcpy(ptr, function_endW, sizeof(function_endW)); diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index cc2c3c1ef4..33de641483 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -964,7 +964,7 @@ static const builtin_prop_t JSGlobal_props[] = { static const builtin_info_t JSGlobal_info = { JSCLASS_GLOBAL, {NULL, NULL, 0}, - sizeof(JSGlobal_props)/sizeof(*JSGlobal_props), + ARRAY_SIZE(JSGlobal_props), JSGlobal_props, NULL, NULL diff --git a/dlls/jscript/json.c b/dlls/jscript/json.c index 0430d415ba..0267340ca4 100644 --- a/dlls/jscript/json.c +++ b/dlls/jscript/json.c @@ -836,7 +836,7 @@ static const builtin_prop_t JSON_props[] = { static const builtin_info_t JSON_info = { JSCLASS_JSON, {NULL, NULL, 0}, - sizeof(JSON_props)/sizeof(*JSON_props), + ARRAY_SIZE(JSON_props), JSON_props, NULL, NULL diff --git a/dlls/jscript/jsregexp.c b/dlls/jscript/jsregexp.c index 821c0164eb..84360694ee 100644 --- a/dlls/jscript/jsregexp.c +++ b/dlls/jscript/jsregexp.c @@ -96,7 +96,7 @@ static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance *regexp, }
if(!(rem_flags & REM_NO_CTX_UPDATE)) { - DWORD i, n = min(sizeof(ctx->match_parens)/sizeof(ctx->match_parens[0]), ret->paren_count); + DWORD i, n = min(ARRAY_SIZE(ctx->match_parens), ret->paren_count);
for(i=0; i < n; i++) { if(ret->parens[i].index == -1) { @@ -108,7 +108,7 @@ static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance *regexp, } }
- if(n < sizeof(ctx->match_parens)/sizeof(ctx->match_parens[0])) + if(n < ARRAY_SIZE(ctx->match_parens)) memset(ctx->match_parens+n, 0, sizeof(ctx->match_parens) - n*sizeof(ctx->match_parens[0])); }
@@ -595,7 +595,7 @@ static const builtin_prop_t RegExp_props[] = { static const builtin_info_t RegExp_info = { JSCLASS_REGEXP, {NULL, RegExp_value, 0}, - sizeof(RegExp_props)/sizeof(*RegExp_props), + ARRAY_SIZE(RegExp_props), RegExp_props, RegExp_destructor, NULL @@ -612,7 +612,7 @@ static const builtin_prop_t RegExpInst_props[] = { static const builtin_info_t RegExpInst_info = { JSCLASS_REGEXP, {NULL, RegExp_value, 0}, - sizeof(RegExpInst_props)/sizeof(*RegExpInst_props), + ARRAY_SIZE(RegExpInst_props), RegExpInst_props, RegExp_destructor, NULL @@ -995,7 +995,7 @@ static const builtin_prop_t RegExpConstr_props[] = { static const builtin_info_t RegExpConstr_info = { JSCLASS_FUNCTION, DEFAULT_FUNCTION_VALUE, - sizeof(RegExpConstr_props)/sizeof(*RegExpConstr_props), + ARRAY_SIZE(RegExpConstr_props), RegExpConstr_props, NULL, NULL diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index 90206113a2..72dd4dbe9c 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -526,8 +526,8 @@ static HRESULT str_to_number(jsstr_t *str, double *ret) ptr++; }
- if(!strncmpW(ptr, infinityW, sizeof(infinityW)/sizeof(WCHAR))) { - ptr += sizeof(infinityW)/sizeof(WCHAR); + if(!strncmpW(ptr, infinityW, ARRAY_SIZE(infinityW))) { + ptr += ARRAY_SIZE(infinityW); while(*ptr && isspaceW(*ptr)) ptr++;
@@ -701,7 +701,7 @@ static jsstr_t *int_to_string(int i) i = -i; }
- p = buf + sizeof(buf)/sizeof(*buf)-1; + p = buf + ARRAY_SIZE(buf)-1; *p-- = 0; while(i) { *p-- = i%10 + '0'; diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index b4cc82a259..7ef2112dc8 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -162,7 +162,7 @@ static int hex_to_int(WCHAR c)
static int check_keywords(parser_ctx_t *ctx, const WCHAR **lval) { - int min = 0, max = sizeof(keywords)/sizeof(keywords[0])-1, r, i; + int min = 0, max = ARRAY_SIZE(keywords)-1, r, i;
while(min <= max) { i = (min+max)/2; diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c index 109df9d321..dc07a97758 100644 --- a/dlls/jscript/math.c +++ b/dlls/jscript/math.c @@ -522,7 +522,7 @@ static const builtin_prop_t Math_props[] = { static const builtin_info_t Math_info = { JSCLASS_MATH, {NULL, NULL, 0}, - sizeof(Math_props)/sizeof(*Math_props), + ARRAY_SIZE(Math_props), Math_props, NULL, NULL @@ -558,7 +558,7 @@ HRESULT create_math(script_ctx_t *ctx, jsdisp_t **ret) return hres; }
- for(i=0; i < sizeof(constants)/sizeof(*constants); i++) { + for(i=0; i < ARRAY_SIZE(constants); i++) { hres = jsdisp_define_data_property(math, constants[i].name, 0, jsval_number(constants[i].val)); if(FAILED(hres)) { diff --git a/dlls/jscript/number.c b/dlls/jscript/number.c index 94c8cc4e07..3d9890b36a 100644 --- a/dlls/jscript/number.c +++ b/dlls/jscript/number.c @@ -524,7 +524,7 @@ static const builtin_prop_t Number_props[] = { static const builtin_info_t Number_info = { JSCLASS_NUMBER, {NULL, NULL,0, Number_get_value}, - sizeof(Number_props)/sizeof(*Number_props), + ARRAY_SIZE(Number_props), Number_props, NULL, NULL diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index 9428931525..487eb5f14b 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -252,7 +252,7 @@ static const builtin_prop_t Object_props[] = { static const builtin_info_t Object_info = { JSCLASS_OBJECT, {NULL, NULL,0, Object_get_value}, - sizeof(Object_props)/sizeof(*Object_props), + ARRAY_SIZE(Object_props), Object_props, Object_destructor, NULL @@ -528,7 +528,7 @@ static const builtin_prop_t ObjectConstr_props[] = { static const builtin_info_t ObjectConstr_info = { JSCLASS_FUNCTION, DEFAULT_FUNCTION_VALUE, - sizeof(ObjectConstr_props)/sizeof(*ObjectConstr_props), + ARRAY_SIZE(ObjectConstr_props), ObjectConstr_props, NULL, NULL diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index e6e4997e3e..7a6133dbcf 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -943,7 +943,7 @@ static HRESULT String_replace(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un }else { static const WCHAR undefinedW[] = {'u','n','d','e','f','i','n','e','d'};
- hres = strbuf_append(&ret, undefinedW, sizeof(undefinedW)/sizeof(WCHAR)); + hres = strbuf_append(&ret, undefinedW, ARRAY_SIZE(undefinedW)); if(FAILED(hres)) break; } @@ -1595,7 +1595,7 @@ static const builtin_prop_t String_props[] = { static const builtin_info_t String_info = { JSCLASS_STRING, {NULL, NULL,0, String_get_value}, - sizeof(String_props)/sizeof(*String_props), + ARRAY_SIZE(String_props), String_props, String_destructor, NULL @@ -1608,7 +1608,7 @@ static const builtin_prop_t StringInst_props[] = { static const builtin_info_t StringInst_info = { JSCLASS_STRING, {NULL, NULL,0, String_get_value}, - sizeof(StringInst_props)/sizeof(*StringInst_props), + ARRAY_SIZE(StringInst_props), StringInst_props, String_destructor, NULL, @@ -1726,7 +1726,7 @@ static const builtin_prop_t StringConstr_props[] = { static const builtin_info_t StringConstr_info = { JSCLASS_FUNCTION, DEFAULT_FUNCTION_VALUE, - sizeof(StringConstr_props)/sizeof(*StringConstr_props), + ARRAY_SIZE(StringConstr_props), StringConstr_props, NULL, NULL diff --git a/dlls/jscript/vbarray.c b/dlls/jscript/vbarray.c index 23122282e7..4bed5fb076 100644 --- a/dlls/jscript/vbarray.c +++ b/dlls/jscript/vbarray.c @@ -258,7 +258,7 @@ static const builtin_prop_t VBArray_props[] = { static const builtin_info_t VBArray_info = { JSCLASS_VBARRAY, {NULL, VBArray_value, 0}, - sizeof(VBArray_props)/sizeof(*VBArray_props), + ARRAY_SIZE(VBArray_props), VBArray_props, VBArray_destructor, NULL