Use a more precise calculation for max in time-ratelim.c

CID 1239297
This commit is contained in:
Nick Mathewson 2014-09-18 12:04:16 -04:00
parent a677b72bd6
commit ca5b5c7d86

View File

@ -220,7 +220,7 @@ check_bucket_levels_cb(evutil_socket_t fd, short events, void *arg)
#undef B
total_n_bev_checks++;
if (total_n_bev_checks >= .8 * (cfg_duration / cfg_tick_msec) * cfg_n_connections) {
if (total_n_bev_checks >= .8 * ((double)cfg_duration / cfg_tick_msec) * cfg_n_connections) {
event_free(event_base_get_running_event(bufferevent_get_base(bev)));
}
}