summaryrefslogtreecommitdiff
path: root/src/common/compat_time.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-24 15:26:57 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-24 15:26:57 -0400
commit1d0f7b7ccd547f1e4f381cf4a8a461ff669b73e2 (patch)
tree4c92f4d7b4cad763661231b389d4c164086d59b4 /src/common/compat_time.c
parentc4744a01cc96b85cc644e07cd2aa5994742a4329 (diff)
downloadtor-1d0f7b7ccd547f1e4f381cf4a8a461ff669b73e2.tar.gz
tor-1d0f7b7ccd547f1e4f381cf4a8a461ff669b73e2.zip
Apply test-operator-cleanup to src/common too.
Diffstat (limited to 'src/common/compat_time.c')
-rw-r--r--src/common/compat_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 2ccaa36e49..3c00c96f94 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -251,7 +251,7 @@ ratchet_timeval(const struct timeval *timeval_raw, struct timeval *out)
{
/* must hold lock */
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. */
timersub(&last_timeofday, timeval_raw, &timeofday_offset);
memcpy(out, &last_timeofday, sizeof(struct timeval));