summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-16 22:15:48 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-16 22:15:48 +0000
commit807adfc879ca29d068ca1161587bf4ad050e8f82 (patch)
tree34f9f9a5aba235c4d924495d9cc8f03fc5af0e5f /src/or
parentb837191fd0e897cbc5fc33874190bab8bbb83268 (diff)
downloadtor-807adfc879ca29d068ca1161587bf4ad050e8f82.tar.gz
tor-807adfc879ca29d068ca1161587bf4ad050e8f82.zip
r12769@catbus: nickm | 2007-05-16 17:32:01 -0400
Fix warnings from -Wunsafe-loop-optimizations, which incidentally turned up a logic bug in connection_or_flush_from_first_active_circuit that would overcount the number of cells flushed. svn:r10199
Diffstat (limited to 'src/or')
-rw-r--r--src/or/relay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 469741f95b..14078d2d69 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1807,7 +1807,7 @@ connection_or_flush_from_first_active_circuit(or_connection_t *conn, int max)
}
tor_assert(*next_circ_on_conn_p(circ,conn));
- for (n_flushed = 0; n_flushed < max && queue->head; ++n_flushed) {
+ for (n_flushed = 0; n_flushed < max && queue->head; ) {
packed_cell_t *cell = cell_queue_pop(queue);
tor_assert(*next_circ_on_conn_p(circ,conn));