Parcourir la source

scan-build: circuit_cpath_support_ntor had a dead initialization

We were initializing cpath twice, which doesn't make sense.
Nick Mathewson il y a 10 ans
Parent
commit
d1be2f5cf8
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/or/circuitbuild.c

+ 2 - 2
src/or/circuitbuild.c

@@ -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(