]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Apply test-operator-cleanup to src/common too.
authorNick Mathewson <nickm@torproject.org>
Thu, 24 Aug 2017 19:26:57 +0000 (15:26 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 24 Aug 2017 19:26:57 +0000 (15:26 -0400)
src/common/compat_time.c

index 2ccaa36e495d9fe4fe6ff7ca4aca8ad9adaab071..3c00c96f9480e56435ea46a4d54a26630c2c8932 100644 (file)
@@ -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));