aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-12 17:46:09 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-12 21:32:34 -0400
commitf2f729e26b93fe42aeac0c0f99bf9ea8dc62591b (patch)
treea9073ba994607080d71687e04b67f34b76f25528 /src/or/connection.c
parentdb00f24d8be848f5840af913e88d5ae7019c70f6 (diff)
downloadtor-f2f729e26b93fe42aeac0c0f99bf9ea8dc62591b.tar.gz
tor-f2f729e26b93fe42aeac0c0f99bf9ea8dc62591b.zip
Clear up dead-assignment warnings from scan-build
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 5c675acca4..ac26d43fff 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -3062,9 +3062,11 @@ connection_buckets_decrement(connection_t *conn, time_t now,
(unsigned long)num_read, (unsigned long)num_written,
conn_type_to_string(conn->type),
conn_state_to_string(conn->type, conn->state));
- if (num_written >= INT_MAX) num_written = 1;
- if (num_read >= INT_MAX) num_read = 1;
- tor_fragile_assert();
+ tor_assert_nonfatal_unreached();
+ if (num_written >= INT_MAX)
+ num_written = 1;
+ if (num_read >= INT_MAX)
+ num_read = 1;
}
record_num_bytes_transferred_impl(conn, now, num_read, num_written);
@@ -3593,10 +3595,8 @@ connection_buf_read_from_socket(connection_t *conn, ssize_t *max_to_read,
connection_start_reading(conn);
}
/* we're already reading, one hopes */
- result = 0;
break;
case TOR_TLS_DONE: /* no data read, so nothing to process */
- result = 0;
break; /* so we call bucket_decrement below */
default:
break;