]> git.ipfire.org Git - thirdparty/systemd.git/commit
time-util: use usec_add() and usec_sub_unsigned()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 13 Feb 2023 19:27:27 +0000 (04:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Feb 2023 23:55:27 +0000 (08:55 +0900)
commitdb43717e982e1361eee4bdcd92167d6c47eb627c
treeebf219dc1fd96d2a4c3be640f63c204f3b3d2cce
parentf2ecfd8bc1e6d09173e9f98c5ac1b19b755a3c25
time-util: use usec_add() and usec_sub_unsigned()

And move the check with USEC_TIMESTAMP_FORMATTABLE_MAX at the end,
as usec_add() can handle overflow correctly.
src/basic/time-util.c