aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-02-13 13:53:30 -0500
committerNick Mathewson <nickm@torproject.org>2017-02-14 16:31:11 -0500
commit1afc2ed956a35b40dfd1d207652af5b50c295da7 (patch)
treec8be4f7d2c49994945227fdaff0e5191ed857e4e /src/or/routerlist.c
parent4a2afd5b33f02ed3e5eb591dd29537fa4f69399f (diff)
downloadtor-1afc2ed956a35b40dfd1d207652af5b50c295da7.tar.gz
tor-1afc2ed956a35b40dfd1d207652af5b50c295da7.zip
Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related to 21278.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index b876795445..2365f28fd2 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -5445,7 +5445,7 @@ router_differences_are_cosmetic(const routerinfo_t *r1, const routerinfo_t *r2)
(r1->contact_info && r2->contact_info &&
strcasecmp(r1->contact_info, r2->contact_info)) ||
r1->is_hibernating != r2->is_hibernating ||
- cmp_addr_policies(r1->exit_policy, r2->exit_policy) ||
+ ! addr_policies_eq(r1->exit_policy, r2->exit_policy) ||
(r1->supports_tunnelled_dir_requests !=
r2->supports_tunnelled_dir_requests))
return 0;