]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix compile without warnings on OS X 10.6
authorSebastian Hahn <sebastian@torproject.org>
Mon, 27 Dec 2010 10:37:16 +0000 (11:37 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Mon, 27 Dec 2010 10:37:16 +0000 (11:37 +0100)
src/or/rephist.c

index e59fcb56a92d239dea651a80c16e26ef3174dd94..1bbfe310f333f4a40422c751d9cc4a0b581b6632 100644 (file)
@@ -335,12 +335,12 @@ rep_hist_note_router_reachable(const char *id, const tor_addr_t *at_addr,
     tor_assert(at_addr);
 
     if ((ns = networkstatus_get_latest_consensus())) {
-      int fresh_interval = ns->fresh_until - ns->valid_after;
-      int live_interval = ns->valid_until - ns->valid_after;
+      int fresh_interval = (int)(ns->fresh_until - ns->valid_after);
+      int live_interval = (int)(ns->valid_until - ns->valid_after);
       /* on average, a descriptor addr change takes .5 intervals to make it
        * into a consensus, and half a liveness period to make it to
        * clients. */
-      penalty = (fresh_interval + live_interval) / 2;
+      penalty = (int)(fresh_interval + live_interval) / 2;
     }
     format_local_iso_time(tbuf, hist->start_of_run);
     log_info(LD_HIST,"Router %s still seems Running, but its address appears "