diff options
author | ngie <ngie@FreeBSD.org> | 2014-11-16 20:35:32 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-11-16 20:35:32 +0000 |
commit | d4d5fb458ad6edb402014a138b1bb0d35e6aa4f0 (patch) | |
tree | 49537c7586e2df8c933ac8f8eb8562a9bdcb9a66 | |
parent | aafcbc634af40ccf4c272014500d79a0e2718091 (diff) | |
download | FreeBSD-src-d4d5fb458ad6edb402014a138b1bb0d35e6aa4f0.zip FreeBSD-src-d4d5fb458ad6edb402014a138b1bb0d35e6aa4f0.tar.gz |
Reset errno to 0 before running scalbn to be sure that the tested errno is
valid
Sponsored by: EMC / Isilon Storage Division
-rw-r--r-- | contrib/netbsd-tests/lib/libm/t_scalbn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libm/t_scalbn.c b/contrib/netbsd-tests/lib/libm/t_scalbn.c index 586c2c3..2d186cf 100644 --- a/contrib/netbsd-tests/lib/libm/t_scalbn.c +++ b/contrib/netbsd-tests/lib/libm/t_scalbn.c @@ -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, |