diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2024-07-11 12:57:01 +0200 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2024-07-11 16:01:41 +0200 |
commit | 75f53d7c2c1f6706d1d4c1f3eed3aa675464c62f (patch) | |
tree | e2ffe7440092f4a1f293483e684b8d347d15ad54 /lisp/emacs-lisp | |
parent | 0c850df888ebb68096a82ab32089e809de591620 (diff) | |
download | emacs-75f53d7c2c1f6706d1d4c1f3eed3aa675464c62f.tar.gz emacs-75f53d7c2c1f6706d1d4c1f3eed3aa675464c62f.tar.bz2 emacs-75f53d7c2c1f6706d1d4c1f3eed3aa675464c62f.zip |
In timefns.c avoid by-hand overflow checking
Prefer functions like ckd_add to do overflow checking, instead of
doing it by hand, to simplify and I hope to make things a bit less
error prone.
* src/timefns.c (TIME_T_MIN, TIME_T_MAX): Remove. All by-hand
overflow checking replaced with calls to ckd_add or ckd_mul.
(s_ns_to_timespec): New static function, that uses ckd_add
instead of by-hand overflow checking.
(ticks_hz_to_timespec): Use it.
(check_tm_member): Use mpz_fits_sint_p and mpz_get_si rather
than mpz_to_intmax and by-hand overflow checking.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions