diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-06-02 14:39:30 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-06-02 14:39:30 +0200 |
commit | 5a5e2b781a544883f29b5c46fbbc38a198f70f23 (patch) | |
tree | fb362c5fd2e0e47ea78fb2ec240c12be075455df /lib/erl_interface/src/legacy/erl_eterm.c | |
parent | 1c77269abc1a4772c8123470e93e1cd38f316e2f (diff) | |
download | otp-5a5e2b781a544883f29b5c46fbbc38a198f70f23.tar.gz otp-5a5e2b781a544883f29b5c46fbbc38a198f70f23.tar.bz2 otp-5a5e2b781a544883f29b5c46fbbc38a198f70f23.zip |
erl_interface: Use isfinite instead of fpclassify
Diffstat (limited to 'lib/erl_interface/src/legacy/erl_eterm.c')
-rw-r--r-- | lib/erl_interface/src/legacy/erl_eterm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/erl_interface/src/legacy/erl_eterm.c b/lib/erl_interface/src/legacy/erl_eterm.c index c167fd1f78..060e311f69 100644 --- a/lib/erl_interface/src/legacy/erl_eterm.c +++ b/lib/erl_interface/src/legacy/erl_eterm.c @@ -129,10 +129,8 @@ ETERM *erl_mk_float (double d) /* Erlang does not handle Inf and NaN, so we return an error * rather than letting the Erlang VM complain about a bad external * term. */ - switch(fpclassify(d)) { - case FP_NAN: - case FP_INFINITE: - return NULL; + if(!isfinite(d)) { + return NULL; } ep = erl_alloc_eterm(ERL_FLOAT); |