diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-31 10:07:42 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-31 10:07:42 -0400 |
commit | 5e0cfba969e886b2f1769b70c425de658b229e9f (patch) | |
tree | 86b779c821c8c406da45ccc380acf87a1f67fb22 /src/or/microdesc.c | |
parent | 9efd970dd9e04177832312d6d611a855ec4e455f (diff) | |
download | tor-5e0cfba969e886b2f1769b70c425de658b229e9f.tar.gz tor-5e0cfba969e886b2f1769b70c425de658b229e9f.zip |
Fix a clang compilation warning
Subtracting two time_t values was yielding something that maybe
can't be fit in an int.
Bugfix on 0389d4aa; bug not in any released Tor.
Diffstat (limited to 'src/or/microdesc.c')
-rw-r--r-- | src/or/microdesc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 454ec946b4..49773329c4 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -378,19 +378,19 @@ microdesc_cache_clean(microdesc_cache_t *cache, time_t cutoff, int force) /* Let's try to diagnose and fix #7164 . */ smartlist_t *nodes = nodelist_find_nodes_with_microdesc(*mdp); const networkstatus_t *ns = networkstatus_get_latest_consensus(); - int networkstatus_age = -1; + long networkstatus_age = -1; if (ns) { networkstatus_age = now - ns->valid_after; } log_warn(LD_BUG, "Microdescriptor seemed very old " "(last listed %d hours ago vs %d hour cutoff), but is still " "marked as being held by %d node(s). I found %d node(s) " - "holding it. Current networkstatus is %d hours old.", + "holding it. Current networkstatus is %ld hours old.", (int)((now - (*mdp)->last_listed) / 3600), (int)((now - cutoff) / 3600), held_by_nodes, smartlist_len(nodes), - (int)(networkstatus_age / 3600)); + networkstatus_age / 3600); SMARTLIST_FOREACH_BEGIN(nodes, const node_t *, node) { const char *rs_match = "No RS"; |