aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2015-09-29 17:54:28 +0000
committerXin LI <delphij@FreeBSD.org>2015-09-29 17:54:28 +0000
commitb95523e859168243d427ca8b886a88f79090ddc8 (patch)
treea38f6ce703b042ace9e377da31103b5471feb8fc /lib/libc
parente0efd9ee696ad23e66910291a718f3e438470211 (diff)
downloadsrc-b95523e859168243d427ca8b886a88f79090ddc8.tar.gz
src-b95523e859168243d427ca8b886a88f79090ddc8.zip
In this context fclose() can never fail, so assert it in the test
case.
Notes
Notes: svn path=/head/; revision=288382
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/tests/stdio/fmemopen2_test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/tests/stdio/fmemopen2_test.c b/lib/libc/tests/stdio/fmemopen2_test.c
index d137780f1ce1..9555173a3861 100644
--- a/lib/libc/tests/stdio/fmemopen2_test.c
+++ b/lib/libc/tests/stdio/fmemopen2_test.c
@@ -97,6 +97,7 @@ ATF_TC_BODY(test_preexisting, tc)
/* Close the FILE *. */
rc = fclose(fp);
+ ATF_REQUIRE(rc == 0);
/* Check that the string was not modified after the first 4 bytes. */
ATF_REQUIRE(strcmp(str, str3) == 0);