diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-02-13 13:53:30 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-02-14 16:31:11 -0500 |
commit | 1afc2ed956a35b40dfd1d207652af5b50c295da7 (patch) | |
tree | c8be4f7d2c49994945227fdaff0e5191ed857e4e /src/or/policies.h | |
parent | 4a2afd5b33f02ed3e5eb591dd29537fa4f69399f (diff) | |
download | tor-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/policies.h')
-rw-r--r-- | src/or/policies.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/policies.h b/src/or/policies.h index 850fa863d6..f73f850c21 100644 --- a/src/or/policies.h +++ b/src/or/policies.h @@ -76,7 +76,7 @@ void policy_expand_unspec(smartlist_t **policy); int policies_parse_from_options(const or_options_t *options); addr_policy_t *addr_policy_get_canonical_entry(addr_policy_t *ent); -int cmp_addr_policies(smartlist_t *a, smartlist_t *b); +int addr_policies_eq(const smartlist_t *a, const smartlist_t *b); MOCK_DECL(addr_policy_result_t, compare_tor_addr_to_addr_policy, (const tor_addr_t *addr, uint16_t port, const smartlist_t *policy)); addr_policy_result_t compare_tor_addr_to_node_policy(const tor_addr_t *addr, |