diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2020-03-18 23:58:46 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-03-19 00:11:16 -0700 |
| commit | 37d3c1618b6cdf7efc90015fb2786aa30ef0de47 (patch) | |
| tree | 6cb3c076b98da02c2272461331c413a426c1acf8 /src/timefns.c | |
| parent | efb5115ba29d75e1227e36da3d92dc2f5c5b6257 (diff) | |
| download | emacs-37d3c1618b6cdf7efc90015fb2786aa30ef0de47.tar.gz | |
Tiny simplification of frac_to_double
* src/timefns.c (frac_to_double): Remove unnecessary runtime check,
since the denominator is always positive.
Diffstat (limited to 'src/timefns.c')
| -rw-r--r-- | src/timefns.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/timefns.c b/src/timefns.c index a9595b5d239..7bcc37d7c1e 100644 --- a/src/timefns.c +++ b/src/timefns.c @@ -593,7 +593,7 @@ timespec_to_lisp (struct timespec t) } /* Return NUMERATOR / DENOMINATOR, rounded to the nearest double. - Arguments must be Lisp integers, and DENOMINATOR must be nonzero. */ + Arguments must be Lisp integers, and DENOMINATOR must be positive. */ static double frac_to_double (Lisp_Object numerator, Lisp_Object denominator) { @@ -601,7 +601,6 @@ frac_to_double (Lisp_Object numerator, Lisp_Object denominator) if (FASTER_TIMEFNS && integer_to_intmax (numerator, &intmax_numerator) && integer_to_intmax (denominator, &intmax_denominator) - && ! INT_DIVIDE_OVERFLOW (intmax_numerator, intmax_denominator) && intmax_numerator % intmax_denominator == 0) return intmax_numerator / intmax_denominator; |
