]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix clang warning, IPv6 address comment, buffer size typo
authorteor <teor2345@gmail.com>
Sat, 20 Dec 2014 11:20:54 +0000 (22:20 +1100)
committerNick Mathewson <nickm@torproject.org>
Sun, 21 Dec 2014 18:35:03 +0000 (13:35 -0500)
The address of an array in the middle of a structure will
always be non-NULL. clang recognises this and complains.
Disable the tautologous and redundant check to silence
this warning.

Fixes bug 14001.

changes/bug14001-clang-warning [new file with mode: 0644]
src/or/connection_edge.c

diff --git a/changes/bug14001-clang-warning b/changes/bug14001-clang-warning
new file mode 100644 (file)
index 0000000..b932af6
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - The address of an array in the middle of a structure will
+      always be non-NULL. clang recognises this and complains.
+      Disable the tautologous and redundant check to silence
+      this warning.
+      Fixes bug 14001.
index 9ace375d74cbdab857ac92fa7da715cdd174a3c0..a90ca00883d05ffa0fb0a73c884a841cb460562d 100644 (file)
@@ -744,8 +744,9 @@ connection_ap_fail_onehop(const char *failed_digest,
       /* we don't know the digest; have to compare addr:port */
       tor_addr_t addr;
       if (!build_state || !build_state->chosen_exit ||
-          !entry_conn->socks_request || !entry_conn->socks_request->address)
+          !entry_conn->socks_request) {
         continue;
+      }
       if (tor_addr_parse(&addr, entry_conn->socks_request->address)<0 ||
           !tor_addr_eq(&build_state->chosen_exit->addr, &addr) ||
           build_state->chosen_exit->port != entry_conn->socks_request->port)