diff options
author | teor <teor@riseup.net> | 2020-05-11 18:10:07 +1000 |
---|---|---|
committer | teor <teor@riseup.net> | 2020-05-18 21:53:52 +1000 |
commit | a3244c03fb586268da72fbe90bc8f4def85aaff7 (patch) | |
tree | 7ebef6f38107ead7f8d51c8bea078d03b643ee78 /src/feature/nodelist/routerlist.c | |
parent | 3f7f976d4812a92bdbf5f14e25db0d276f123cef (diff) | |
download | tor-a3244c03fb586268da72fbe90bc8f4def85aaff7.tar.gz tor-a3244c03fb586268da72fbe90bc8f4def85aaff7.zip |
nodelist: Replace int with bool
Make some interfaces and implementations consistent by replacing int
with bool.
Part of 34200.
Diffstat (limited to 'src/feature/nodelist/routerlist.c')
-rw-r--r-- | src/feature/nodelist/routerlist.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c index 1106222830..72ea48898b 100644 --- a/src/feature/nodelist/routerlist.c +++ b/src/feature/nodelist/routerlist.c @@ -542,18 +542,18 @@ void router_add_running_nodes_to_smartlist(smartlist_t *sl, int flags) { /* The full set of flags used for node selection. */ - const int need_uptime = (flags & CRN_NEED_UPTIME) != 0; - const int need_capacity = (flags & CRN_NEED_CAPACITY) != 0; - const int need_guard = (flags & CRN_NEED_GUARD) != 0; - const int need_desc = (flags & CRN_NEED_DESC) != 0; - const int pref_addr = (flags & CRN_PREF_ADDR) != 0; - const int direct_conn = (flags & CRN_DIRECT_CONN) != 0; - const int rendezvous_v3 = (flags & CRN_RENDEZVOUS_V3) != 0; + const bool need_uptime = (flags & CRN_NEED_UPTIME) != 0; + const bool need_capacity = (flags & CRN_NEED_CAPACITY) != 0; + const bool need_guard = (flags & CRN_NEED_GUARD) != 0; + const bool need_desc = (flags & CRN_NEED_DESC) != 0; + const bool pref_addr = (flags & CRN_PREF_ADDR) != 0; + const bool direct_conn = (flags & CRN_DIRECT_CONN) != 0; + const bool rendezvous_v3 = (flags & CRN_RENDEZVOUS_V3) != 0; const bool initiate_ipv6_extend = (flags & CRN_INITIATE_IPV6_EXTEND) != 0; - const int check_reach = !router_or_conn_should_skip_reachable_address_check( - get_options(), - pref_addr); + const bool check_reach = + !router_or_conn_should_skip_reachable_address_check(get_options(), + pref_addr); SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), const node_t *, node) { if (!node->is_running || !node->is_valid) |