[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Apply test-operator-cleanup to src/common too.



commit 1d0f7b7ccd547f1e4f381cf4a8a461ff669b73e2
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Aug 24 15:26:57 2017 -0400

    Apply test-operator-cleanup to src/common too.
---
 src/common/compat_time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 2ccaa36e4..3c00c96f9 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));



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits