Reset errno to 0 before running scalbn to be sure that the tested errno is

valid

Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
ngie 2014-11-16 20:35:32 +00:00
parent aafcbc634a
commit d4d5fb458a

View File

@ -81,6 +81,9 @@ ATF_TC_BODY(scalbn_val, tc)
double rv;
for (i = 0; i < tcnt; i++) {
#ifdef __FreeBSD__
errno = 0;
#endif
rv = scalbn(tests[i].inval, tests[i].exp);
ATF_CHECK_EQ_MSG(errno, tests[i].error,
"test %zu: errno %d instead of %d", i, errno,