msvcrt/tests: Avoid sizeof in traces.

This commit is contained in:
Alexandre Julliard 2010-11-17 15:08:03 +01:00
parent 19b251885c
commit 45a8b643cd
1 changed files with 2 additions and 2 deletions

View File

@ -1237,7 +1237,7 @@ static void test_fopen_s( void )
file = fopen(name, "r"); file = fopen(name, "r");
ok(file != 0, "fopen failed\n"); ok(file != 0, "fopen failed\n");
len = fread(buff, 1, sizeof(name), file); len = fread(buff, 1, sizeof(name), file);
ok(len == sizeof(name), "File length supposed to be %d, not %d\n", sizeof(name), len); ok(len == sizeof(name), "File length is %d\n", len);
buff[sizeof(name)] = '\0'; buff[sizeof(name)] = '\0';
ok(strcmp(name, buff) == 0, "File content mismatch! Got %s, expected %s\n", buff, name); ok(strcmp(name, buff) == 0, "File content mismatch! Got %s, expected %s\n", buff, name);
@ -1278,7 +1278,7 @@ static void test__wfopen_s( void )
file = fopen(name, "r"); file = fopen(name, "r");
ok(file != 0, "fopen failed\n"); ok(file != 0, "fopen failed\n");
len = fread(buff, 1, sizeof(name), file); len = fread(buff, 1, sizeof(name), file);
ok(len == sizeof(name), "File length supposed to be %d, not %d\n", sizeof(name), len); ok(len == sizeof(name), "File length is %d\n", len);
buff[sizeof(name)] = '\0'; buff[sizeof(name)] = '\0';
ok(strcmp(name, buff) == 0, "File content mismatch! Got %s, expected %s\n", buff, name); ok(strcmp(name, buff) == 0, "File content mismatch! Got %s, expected %s\n", buff, name);