mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 05:26:20 +02:00
Apply test-operator-cleanup to src/common too.
This commit is contained in:
parent
c4744a01cc
commit
1d0f7b7ccd
@ -251,7 +251,7 @@ ratchet_timeval(const struct timeval *timeval_raw, struct timeval *out)
|
|||||||
{
|
{
|
||||||
/* must hold lock */
|
/* must hold lock */
|
||||||
timeradd(timeval_raw, &timeofday_offset, out);
|
timeradd(timeval_raw, &timeofday_offset, out);
|
||||||
if (PREDICT_UNLIKELY(timercmp(out, &last_timeofday, <))) {
|
if (PREDICT_UNLIKELY(timercmp(out, &last_timeofday, OP_LT))) {
|
||||||
/* time ran backwards. Instead, declare that no time occurred. */
|
/* time ran backwards. Instead, declare that no time occurred. */
|
||||||
timersub(&last_timeofday, timeval_raw, &timeofday_offset);
|
timersub(&last_timeofday, timeval_raw, &timeofday_offset);
|
||||||
memcpy(out, &last_timeofday, sizeof(struct timeval));
|
memcpy(out, &last_timeofday, sizeof(struct timeval));
|
||||||
|
Loading…
Reference in New Issue
Block a user