Browse Source

Make sure expiry check in dirserv_expire_measured_bw_cache() works if time_t is unsigned

Andrea Shepard 12 years ago
parent
commit
302d1dae6c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/dirserv.c

+ 1 - 1
src/or/dirserv.c

@@ -2125,7 +2125,7 @@ dirserv_expire_measured_bw_cache(time_t now)
       e = (mbw_cache_entry_t *)e_v;
       if (e) {
         /* Check for expiration and remove if so */
-        if (now - e->as_of > MAX_MEASUREMENT_AGE) {
+        if (now > e->as_of + MAX_MEASUREMENT_AGE) {
           tor_free(e);
           rmv = 1;
         }