mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Another attempt at fixing coverity scan CID 361.
svn:r17863
This commit is contained in:
parent
d3e57378ec
commit
9201586ed5
@ -3295,7 +3295,8 @@ routerlist_remove_old_routers(void)
|
|||||||
* decide to kill routers.) */
|
* decide to kill routers.) */
|
||||||
/* XXX021 we don't check if we have a v3 consensus, do we? should we? -RD */
|
/* XXX021 we don't check if we have a v3 consensus, do we? should we? -RD */
|
||||||
if (!caches ||
|
if (!caches ||
|
||||||
smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2) {
|
(networkstatus_v2_list &&
|
||||||
|
smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2)) {
|
||||||
cutoff = now - ROUTER_MAX_AGE;
|
cutoff = now - ROUTER_MAX_AGE;
|
||||||
/* Remove too-old unrecommended members of routerlist->routers. */
|
/* Remove too-old unrecommended members of routerlist->routers. */
|
||||||
for (i = 0; i < smartlist_len(routerlist->routers); ++i) {
|
for (i = 0; i < smartlist_len(routerlist->routers); ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user