瀏覽代碼

coverity thinks it's dumb to check networkstatus_v2_list in one place and not another. Coverity has a point, even though the check may be redundant. CID 361.

svn:r17809
Nick Mathewson 17 年之前
父節點
當前提交
272b007268
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/or/routerlist.c

+ 1 - 1
src/or/routerlist.c

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