From 6b9f7133aba44189d9625c352bc2c2a59baf18ef Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 23 Oct 2024 13:28:55 -0400 Subject: [PATCH] libc: Add one more check in new fmemopen test Reported by: jrtc27 Fixes: 0953460ce149 ("libc: fix access mode tests in fmemopen(3)") --- lib/libc/tests/stdio/fmemopen2_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/tests/stdio/fmemopen2_test.c b/lib/libc/tests/stdio/fmemopen2_test.c index 4a7242ee6b2..a558ff3515e 100644 --- a/lib/libc/tests/stdio/fmemopen2_test.c +++ b/lib/libc/tests/stdio/fmemopen2_test.c @@ -296,6 +296,7 @@ ATF_TC_BODY(test_rdonly_wronly, tc) fclose(fp); fp = fmemopen(buf_orig, sizeof(buf), "w"); + ATF_REQUIRE(fp != NULL); sz = fread(buf, sizeof(buf), 1, fp); ATF_REQUIRE(sz == 0); ATF_REQUIRE(errno == EBADF);