From d4d5fb458ad6edb402014a138b1bb0d35e6aa4f0 Mon Sep 17 00:00:00 2001 From: ngie Date: Sun, 16 Nov 2014 20:35:32 +0000 Subject: [PATCH] Reset errno to 0 before running scalbn to be sure that the tested errno is valid Sponsored by: EMC / Isilon Storage Division --- contrib/netbsd-tests/lib/libm/t_scalbn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/netbsd-tests/lib/libm/t_scalbn.c b/contrib/netbsd-tests/lib/libm/t_scalbn.c index 586c2c3bc621..2d186cf1df82 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,