Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libm PR/51839: Ngie Cooper: reset errno to 0 befor...
details: https://anonhg.NetBSD.org/src/rev/d9b18fdb7765
branches: trunk
changeset: 350543:d9b18fdb7765
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 13 19:26:03 2017 +0000
description:
PR/51839: Ngie Cooper: reset errno to 0 before calling scalbn*
diffstat:
tests/lib/libm/t_scalbn.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r bab4e7d703ed -r d9b18fdb7765 tests/lib/libm/t_scalbn.c
--- a/tests/lib/libm/t_scalbn.c Fri Jan 13 19:23:40 2017 +0000
+++ b/tests/lib/libm/t_scalbn.c Fri Jan 13 19:26:03 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_scalbn.c,v 1.11 2014/03/03 10:39:08 martin Exp $ */
+/* $NetBSD: t_scalbn.c,v 1.12 2017/01/13 19:26:03 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_scalbn.c,v 1.11 2014/03/03 10:39:08 martin Exp $");
+__RCSID("$NetBSD: t_scalbn.c,v 1.12 2017/01/13 19:26:03 christos Exp $");
#include <math.h>
#include <limits.h>
@@ -81,6 +81,7 @@
double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0
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,
@@ -222,6 +223,7 @@
double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0
rv = scalbnf(tests[i].inval, tests[i].exp);
ATF_CHECK_EQ_MSG(errno, tests[i].error,
"test %zu: errno %d instead of %d", i, errno,
@@ -366,6 +368,7 @@
long double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0
rv = scalbnl(tests[i].inval, tests[i].exp);
ATF_CHECK_EQ_MSG(errno, tests[i].error,
"test %zu: errno %d instead of %d", i, errno,
Home |
Main Index |
Thread Index |
Old Index