aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-14 16:46:55 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-14 16:46:55 +0000
commit6e35b118518a8247fe1c04099519950cdb9c7971 (patch)
tree3252e5df2e982f1d537cf31d3d51b710b87913fe /src/or/connection.c
parent4a74812c70b75df8938de00c9efb0fabaf699300 (diff)
downloadtor-6e35b118518a8247fe1c04099519950cdb9c7971.tar
tor-6e35b118518a8247fe1c04099519950cdb9c7971.tar.gz
r11813@catbus: nickm | 2007-02-14 11:42:58 -0500
Tweak stream_bw patch: Remove a couple of redundant checks, save 8 bytes per edge connection, fix spelling in the changelog; expand spec. svn:r9586
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 7d31e3f95..29d27c043 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1571,11 +1571,9 @@ connection_read_to_buf(connection_t *conn, int *max_to_read)
*max_to_read = at_most - n_read;
}
- if (CONN_IS_EDGE(conn)) {
- if (conn->type == CONN_TYPE_AP) {
- edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
- edge_conn->n_read += n_read;
- }
+ if (conn->type == CONN_TYPE_AP) {
+ edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
+ edge_conn->n_read += n_read;
}
if (connection_is_rate_limited(conn)) {
@@ -1774,11 +1772,9 @@ connection_handle_write(connection_t *conn, int force)
n_written = (size_t) result;
}
- if (CONN_IS_EDGE(conn)) {
- if (conn->type == CONN_TYPE_AP) {
- edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
- edge_conn->n_written += n_written;
- }
+ if (conn->type == CONN_TYPE_AP) {
+ edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
+ edge_conn->n_written += n_written;
}
if (connection_is_rate_limited(conn)) {