]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a compilation warning introduced by clang 3.6
authorNick Mathewson <nickm@torproject.org>
Tue, 8 Dec 2015 14:37:05 +0000 (09:37 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 8 Dec 2015 14:37:05 +0000 (09:37 -0500)
There was a dead check when we made sure that an array member of a
struct was non-NULL.  Tor has been doing this check since at least
0.2.3, maybe earlier.

Fixes bug 17781.

changes/bug17781 [new file with mode: 0644]
src/or/connection_edge.c

diff --git a/changes/bug17781 b/changes/bug17781
new file mode 100644 (file)
index 0000000..01ed231
--- /dev/null
@@ -0,0 +1,3 @@
+  o Compilation fixes:
+    - Fix a compilation warning with Clang 3.6: Do not check the
+      presence of an address which can never be NULL. Fixes bug 17781.
index 895c0f7f0152a52c4bd0d11e0b4e9b5a2fe48e7e..39f8af61f65051e86ac850ad35f29d3cdb5fed4a 100644 (file)
@@ -748,7 +748,7 @@ 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) ||