1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-17 12:41:05 +03:00
Commit Graph

1 Commits

Author SHA1 Message Date
Paul Eggert
051613c240 timespec-sub: fix overflow bug; add tests
* lib/timespec-add.c (timespec_add):
* lib/timespec-sub.c (timespec_sub):
Work even if time_t is narrower than int (a theoretical
possibility).  Redo code for a bit more clarity.
* lib/timespec-sub.c (timespec_sub):
Fix off-by-2 bug if a.tv_sec == TYPE_MINIMUM (time_t) and 0 < b.tv_sec.
* modules/timespec-tests, tests/test-timespec.c: New files.
2015-11-05 17:43:20 -08:00