summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-09-14 22:32:36 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-14 22:32:36 -0400
commit6d8fc4eb3866122ef42f209cc51a875a3e438607 (patch)
tree89190e195c05359882d3ce2fbc282419eaa6d928 /src/or/relay.c
parent60e3def3ed7428b139cfd6e36517f930a84bd085 (diff)
downloadtor-6d8fc4eb3866122ef42f209cc51a875a3e438607.tar.gz
tor-6d8fc4eb3866122ef42f209cc51a875a3e438607.zip
Add a simple integer-ceiling-division macro before we get it wrong
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 125b2f78e2..935fad9200 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1520,8 +1520,7 @@ circuit_resume_edge_reading_helper(edge_connection_t *first_conn,
again:
- /* ??? turn this into a ceildiv function? */
- cells_per_conn = (max_to_package + n_streams - 1 ) / n_streams;
+ cells_per_conn = CEIL_DIV(max_to_package, n_streams);
packaged_this_round = 0;
n_streams_left = 0;