aboutsummaryrefslogtreecommitdiff
path: root/src/or/geoip.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2009-09-01 05:23:47 +0200
committerSebastian Hahn <sebastian@torproject.org>2009-09-01 22:16:46 +0200
commit0a71d1c6a7289cbadcef5f4a28dd94307decc5be (patch)
tree3a49133baf8c81fd7f962d9c0a8f01f63cb26a64 /src/or/geoip.c
parenta95947b0d74ec8313313919624ec99a62b91ff5c (diff)
downloadtor-0a71d1c6a7289cbadcef5f4a28dd94307decc5be.tar
tor-0a71d1c6a7289cbadcef5f4a28dd94307decc5be.tar.gz
Fix compile warnings on Snow Leopard
Big thanks to nickm and arma for helping me with this!
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r--src/or/geoip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index befc3d9e0..00e608214 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -340,7 +340,7 @@ geoip_determine_shares(time_t now)
((double) (now - last_time_determined_shares));
v3_share_times_seconds += v3_share *
((double) (now - last_time_determined_shares));
- share_seconds += now - last_time_determined_shares;
+ share_seconds += (int)(now - last_time_determined_shares);
}
last_time_determined_shares = now;
}
@@ -768,7 +768,7 @@ geoip_get_dirreq_history(geoip_client_action_t action,
time_diff = 1; /* Avoid DIV/0; "instant" answers are impossible
* by law of nature or something, but a milisecond
* is a bit greater than "instantly" */
- bytes_per_second = 1000 * ent->response_size / time_diff;
+ bytes_per_second = (uint32_t)(1000 * ent->response_size / time_diff);
dltimes[ent_sl_idx] = bytes_per_second;
} SMARTLIST_FOREACH_END(ent);
median_uint32(dltimes, complete); /* sorts as a side effect. */