diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-02-11 15:55:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-02-11 15:55:50 -0500 |
commit | 43d2f99d54d92234615d68935661787d14a89688 (patch) | |
tree | cafdb62c6849758ca6acf6ea6e16351f01001c04 /src | |
parent | 52263b0dda85632ea1deb0f05a83a39d4876f3ab (diff) | |
download | tor-43d2f99d54d92234615d68935661787d14a89688.tar.gz tor-43d2f99d54d92234615d68935661787d14a89688.zip |
Suppress a coverity false positive in connection_edge_package_raw_inbuf
Coverity is worried that we're checking entry_conn in some cases,
but not in the case where we set entry_conn->pending_optimistic_data.
This commit should calm it down (CID 718623).
Diffstat (limited to 'src')
-rw-r--r-- | src/or/relay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 12283fcbbb..22bc40d655 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1563,11 +1563,12 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial, circuit_t *circ; const unsigned domain = conn->base_.type == CONN_TYPE_AP ? LD_APP : LD_EXIT; int sending_from_optimistic = 0; + entry_connection_t *entry_conn = + conn->base_.type == CONN_TYPE_AP ? EDGE_TO_ENTRY_CONN(conn) : NULL; const int sending_optimistically = + entry_conn && conn->base_.type == CONN_TYPE_AP && conn->base_.state != AP_CONN_STATE_OPEN; - entry_connection_t *entry_conn = - conn->base_.type == CONN_TYPE_AP ? EDGE_TO_ENTRY_CONN(conn) : NULL; crypt_path_t *cpath_layer = conn->cpath_layer; tor_assert(conn); |