mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Make sure expiry check in dirserv_expire_measured_bw_cache() works if time_t is unsigned
This commit is contained in:
parent
c7947619df
commit
302d1dae6c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user