summaryrefslogtreecommitdiff
path: root/modules/timespec-tests
Commit message (Collapse)AuthorAgeFilesLines
* timespec-sub: fix overflow bug; add testsPaul Eggert2015-11-051-0/+16
* 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.