[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.2.6] only declare rv when it is used in destination_from_socket. Fixes 15151



commit 2d926d0147af8c632fe389e770c5832009f2ddc0
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Mar 4 12:12:41 2015 +0100

    only declare rv when it is used in destination_from_socket. Fixes 15151
---
 changes/bug15151         |    3 +++
 src/or/connection_edge.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/changes/bug15151 b/changes/bug15151
new file mode 100644
index 0000000..b9c3061
--- /dev/null
+++ b/changes/bug15151
@@ -0,0 +1,3 @@
+  o Minor bugfixes (compilation):
+    - Fix a compilation warning on FreeBSD. Fixes bug 15151; bugfix on
+      0.2.6.2-alpha.
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 3c817de..e6dfc63 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1598,7 +1598,6 @@ destination_from_socket(entry_connection_t *conn, socks_request_t *req)
   struct sockaddr_storage orig_dst;
   socklen_t orig_dst_len = sizeof(orig_dst);
   tor_addr_t addr;
-  int rv;
 
 #ifdef TRANS_TRPOXY
   if (options->TransProxyType_parsed == TPT_TPROXY) {
@@ -1613,6 +1612,7 @@ destination_from_socket(entry_connection_t *conn, socks_request_t *req)
 #endif
 
 #ifdef TRANS_NETFILTER
+  int rv = -1;
   switch (ENTRY_TO_CONN(conn)->socket_family) {
 #ifdef TRANS_NETFILTER_IPV4
     case AF_INET:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits