summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-02-27 20:48:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-02-27 20:48:00 (GMT)
commit9a809e614ae7603730d8cc5f60b454b66dffa972 (patch)
tree4df7f67a7ff3133e363a264c3610852fb46d9f4d /generic/tclStrToD.c
parent0bceead396460bd96a148e6a6c9e55acc1ed7311 (diff)
downloadtcl-9a809e614ae7603730d8cc5f60b454b66dffa972.zip
tcl-9a809e614ae7603730d8cc5f60b454b66dffa972.tar.gz
tcl-9a809e614ae7603730d8cc5f60b454b66dffa972.tar.bz2
Use mp_isneg() in stead of mp_cmp_d() when the output of this function is simply compared with MP_LT.
Diffstat (limited to 'generic/tclStrToD.c')
-rw-r--r--generic/tclStrToD.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index ac2ca68..0434919 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -4697,7 +4697,7 @@ TclCeil(
mp_int b;
mp_init(&b);
- if (mp_cmp_d(a, 0) == MP_LT) {
+ if (mp_isneg(a)) {
mp_neg(a, &b);
r = -TclFloor(&b);
} else {
@@ -4754,7 +4754,7 @@ TclFloor(
mp_int b;
mp_init(&b);
- if (mp_cmp_d(a, 0) == MP_LT) {
+ if (mp_isneg(a)) {
mp_neg(a, &b);
r = -TclCeil(&b);
} else {