X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=modules%2Frostests%2Fwinetests%2Fuser32%2Fwsprintf.c;h=f79b6306a7c25076e4b092432895056053b090bf;hp=f0e80b2ad654dd9acdadcf095a823a14b13ee70a;hb=7a62c32bcc040a9f0ec4090fcbedc58be2232df5;hpb=87801a65f7228446d4ea8b9b84ec5c500afcea15 diff --git a/modules/rostests/winetests/user32/wsprintf.c b/modules/rostests/winetests/user32/wsprintf.c index f0e80b2ad65..f79b6306a7c 100644 --- a/modules/rostests/winetests/user32/wsprintf.c +++ b/modules/rostests/winetests/user32/wsprintf.c @@ -66,7 +66,7 @@ static void wsprintfATest(void) win_skip( "I64 formats not supported\n" ); return; } - for (i = 0; i < sizeof(i64_formats)/sizeof(i64_formats[0]); i++) + for (i = 0; i < ARRAY_SIZE(i64_formats); i++) { rc = wsprintfA(buf, i64_formats[i].fmt, i64_formats[i].value); ok(rc == strlen(i64_formats[i].res), "%u: wsprintfA length failure: rc=%d\n", i, rc); @@ -98,10 +98,10 @@ static void wsprintfWTest(void) win_skip( "I64 formats not supported\n" ); return; } - for (i = 0; i < sizeof(i64_formats)/sizeof(i64_formats[0]); i++) + for (i = 0; i < ARRAY_SIZE(i64_formats); i++) { - MultiByteToWideChar( CP_ACP, 0, i64_formats[i].fmt, -1, fmt, sizeof(fmt)/sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, i64_formats[i].res, -1, res, sizeof(res)/sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, i64_formats[i].fmt, -1, fmt, ARRAY_SIZE(fmt)); + MultiByteToWideChar( CP_ACP, 0, i64_formats[i].res, -1, res, ARRAY_SIZE(res)); rc = wsprintfW(buf, fmt, i64_formats[i].value); ok(rc == lstrlenW(res), "%u: wsprintfW length failure: rc=%d\n", i, rc); ok(!lstrcmpW(buf, res), "%u: wrong result [%s]\n", i, wine_dbgstr_w(buf));