[tor-commits] [tor/master] prop224: Refactor how we use connection_ap_handle_onion

nickm at torproject.org nickm at torproject.org
Thu Aug 24 19:13:52 UTC 2017


commit 5f94c4a0f17403060d5030fab3e81bde46693119
Author: David Goulet <dgoulet at torproject.org>
Date:   Wed Aug 23 10:48:48 2017 -0400

    prop224: Refactor how we use connection_ap_handle_onion
    
    Simply directly return its returned value.
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/or/connection_edge.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 6409c5be8..a98b32450 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2017,9 +2017,7 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
     tor_assert(addresstype == ONION_V2_HOSTNAME ||
                addresstype == ONION_V3_HOSTNAME);
     tor_assert(!automap);
-    if (connection_ap_handle_onion(conn, socks, circ, addresstype) < 0) {
-      return -1;
-    }
+    return connection_ap_handle_onion(conn, socks, circ, addresstype);
   }
 
   return 0; /* unreached but keeps the compiler happy */





More information about the tor-commits mailing list