]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
cid 432: Remove dead code if we don't handle a consensus
authorSebastian Hahn <sebastian@torproject.org>
Fri, 2 Dec 2011 15:35:45 +0000 (16:35 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Sun, 4 Dec 2011 16:36:23 +0000 (17:36 +0100)
Bugfix on 0.2.3.1, fixes the second half of bug 4637.

changes/bug4637 [new file with mode: 0644]
src/or/directory.c

diff --git a/changes/bug4637 b/changes/bug4637
new file mode 100644 (file)
index 0000000..bf2ba93
--- /dev/null
@@ -0,0 +1,3 @@
+  o Code simplifications and refactoring:
+    - Remove some dead code spotted by coverity. Fixes cid 432.
+      Bugfix on 0.2.3.1-alpha, closes bug 4637.
index d4abe0243b78b92f1e7ac2b893c799ddefed481e..12636bac33d0b41deec8387d6438f7bd29ce5876 100644 (file)
@@ -410,7 +410,7 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose,
     } else {
       /* Otherwise it might be a consensus we don't parse, but which we
        * do cache.  Look at the cached copy, perhaps. */
-      cached_dir_t *cd = dirserv_get_consensus(resource ? resource : "ns");
+      cached_dir_t *cd = dirserv_get_consensus(resource);
       if (cd)
         if_modified_since = cd->published + 180;
     }