diff options
author | Po Lu <luangruo@yahoo.com> | 2023-05-18 09:04:57 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-05-18 09:04:57 +0800 |
commit | 074c0268fd32d6527e124cff386bb6b15cf90017 (patch) | |
tree | 62111c3c70d46a738f15514e988a707409ca45f4 /lib/timespec-add.c | |
parent | db48eff8cf4a88393c0209f663ca194ee37fa747 (diff) | |
parent | 5ef169ed701fa4f850fdca5563cdd468207d5d4f (diff) | |
download | emacs-feature/android.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/androidfeature/android
Diffstat (limited to 'lib/timespec-add.c')
-rw-r--r-- | lib/timespec-add.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/timespec-add.c b/lib/timespec-add.c index cb3017803b4..38c4dfc24c2 100644 --- a/lib/timespec-add.c +++ b/lib/timespec-add.c @@ -23,6 +23,7 @@ #include <config.h> #include "timespec.h" +#include <stdckdint.h> #include "intprops.h" struct timespec @@ -38,7 +39,7 @@ timespec_add (struct timespec a, struct timespec b) { rns = nsd; time_t bs1; - if (!INT_ADD_WRAPV (bs, 1, &bs1)) + if (!ckd_add (&bs1, bs, 1)) bs = bs1; else if (rs < 0) rs++; @@ -46,7 +47,7 @@ timespec_add (struct timespec a, struct timespec b) goto high_overflow; } - if (INT_ADD_WRAPV (rs, bs, &rs)) + if (ckd_add (&rs, rs, bs)) { if (bs < 0) { |