]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
coverity thinks it's dumb to check networkstatus_v2_list in one place and not another...
authorNick Mathewson <nickm@torproject.org>
Mon, 29 Dec 2008 14:06:47 +0000 (14:06 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 29 Dec 2008 14:06:47 +0000 (14:06 +0000)
svn:r17809

src/or/routerlist.c

index c4de128666f12beb9ac64d6ec7dbdd7977c2554a..a58976a7e9a557899231fb1df09fc29c85431521 100644 (file)
@@ -3265,7 +3265,7 @@ routerlist_remove_old_routers(void)
 
   cutoff = now - OLD_ROUTER_DESC_MAX_AGE;
   /* Build a list of all the descriptors that _anybody_ lists. */
-  if (caches) {
+  if (caches && networkstatus_v2_list) {
     SMARTLIST_FOREACH(networkstatus_v2_list, networkstatus_v2_t *, ns,
     {
       /* XXXX The inner loop here gets pretty expensive, and actually shows up