Only test the return value in mktime_negyear
Testing for the errno is an optional requirement according to POSIX, and FreeBSD doesn't document that errno would be set on failure with mktime Submitted by: pho Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
8a05dd8595
commit
13727fa5e8
@ -72,7 +72,12 @@ ATF_TC_BODY(mktime_negyear, tc)
|
||||
|
||||
errno = 0;
|
||||
t = mktime(&tms);
|
||||
#if defined(__FreeBSD__)
|
||||
/* Open Group says "and may set errno to indicate the error" */
|
||||
ATF_REQUIRE(t == (time_t)-1);
|
||||
#else
|
||||
ATF_REQUIRE_ERRNO(0, t != (time_t)-1);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC(timegm_epoch);
|
||||
|
Loading…
Reference in New Issue
Block a user