diff --git a/lib/libc/tests/stdio/fmemopen2_test.c b/lib/libc/tests/stdio/fmemopen2_test.c index c3aa6c54a6f9..a2ca3257fe4e 100644 --- a/lib/libc/tests/stdio/fmemopen2_test.c +++ b/lib/libc/tests/stdio/fmemopen2_test.c @@ -250,12 +250,14 @@ ATF_TC_BODY(test_append_binary_pos, tc) FILE *fp; fp = fmemopen(NULL, 16, "ab+"); + ATF_REQUIRE(fp != NULL); ATF_REQUIRE(ftell(fp) == 0L); fclose(fp); /* Make sure that a pre-allocated buffer behaves correctly. */ char buf[] = "Hello"; fp = fmemopen(buf, sizeof(buf), "ab+"); + ATF_REQUIRE(fp != NULL); ATF_REQUIRE(ftell(fp) == strlen(buf)); fclose(fp); }