]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
scan-build: circuit_cpath_support_ntor had a dead initialization
authorNick Mathewson <nickm@torproject.org>
Sat, 19 Apr 2014 00:29:51 +0000 (20:29 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 19 Apr 2014 00:29:51 +0000 (20:29 -0400)
We were initializing cpath twice, which doesn't make sense.

src/or/circuitbuild.c

index 98fef4c142b8b1465938d3aeb2a80790c31b2c08..6bdbead2eb9c75d21f7ce8f351235c6d663c7aee 100644 (file)
@@ -277,9 +277,9 @@ circuit_rep_hist_note_result(origin_circuit_t *circ)
 static int
 circuit_cpath_supports_ntor(const origin_circuit_t *circ)
 {
-  crypt_path_t *head = circ->cpath, *cpath = circ->cpath;
+  crypt_path_t *head, *cpath;
 
-  cpath = head;
+  cpath = head = circ->cpath;
   do {
     if (cpath->extend_info &&
         !tor_mem_is_zero(