]> Savannah Git Hosting - gnulib.git/commit
gethrxtime: remove incorrect overflow detection
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Dec 2019 20:38:22 +0000 (12:38 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Dec 2019 20:45:34 +0000 (12:45 -0800)
commitf935bab8ad7e94938c857b30d75582731db5595a
tree7486a65f8c454471a7cff2585b282f54e3ba08be
parentab3c9473eee5516e2425be7ad3ebe1bd16fa725a
gethrxtime: remove incorrect overflow detection

This is part of a patch written by Bruno Haible:
https://lists.gnu.org/r/bug-gnulib/2019-12/msg00192.html
* lib/xtime.h (xtime_make): Remove attempt to prevent internal
integer overflow, as it didn’t suffice.  This reverts the xtime.h
part of 2018-10-12T04:46:09Z!akim.demaille@gmail.com, which I
cannot now see the need for anyway (even in cases where it works),
as the patch is helpful only when the signs of S and NS disagree,
and all callers pass nonnegative values for S and NS.
Instead, add a comment saying args should be nonnegative.
ChangeLog
lib/xtime.h