summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-17 10:24:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-17 10:24:27 +0000
commit2bfe3c67d89f5e44aede5608f543e66140b04bae (patch)
tree8213bf5f960503f9d4e2a4260f6e7b27513ede0e /math.c
parentc5393634781f0a1c1c685a11e0f9e26b32673a6e (diff)
* math.c (domain_check): check errno first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'math.c')
-rw-r--r--math.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/math.c b/math.c
index abe5f6c164..93de8b3abe 100644
--- a/math.c
+++ b/math.c
@@ -29,9 +29,9 @@ domain_check(x, msg)
double x;
const char *msg;
{
- if (!isnan(x)) return;
- else {
- if (!errno) {
+ if (!errno) {
+ if (!isnan(x)) return;
+ else {
#if defined(EDOM)
errno = EDOM;
#else