diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-15 16:40:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-15 16:40:11 -0400 |
commit | 76c33f7ff46df47df0cc880595c4d943d50f019b (patch) | |
tree | 11448ec9afd6990160ce6212c020d3c2630448d6 /src/or/connection.c | |
parent | c1deabd3b0c9e2701696afc80ac8392f0efda2c7 (diff) | |
parent | a28e239b171c1a69fd32b6583bca0559f7116445 (diff) | |
download | tor-76c33f7ff46df47df0cc880595c4d943d50f019b.tar.gz tor-76c33f7ff46df47df0cc880595c4d943d50f019b.zip |
Merge branch 'scan-build-032'
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 1b979945bf..dd5cb3480d 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; |