summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-02-13 07:16:32 +0000
committerNick Mathewson <nickm@torproject.org>2006-02-13 07:16:32 +0000
commit2a4555fedd80ad64ee71169cf9922f1f2cb53887 (patch)
tree69f47667e265c6eb2870d9b9a2bb37ba8db74984 /src
parent350313d77a1b9dc20abae088ca9db7662dd8a80b (diff)
downloadtor-2a4555fedd80ad64ee71169cf9922f1f2cb53887.tar.gz
tor-2a4555fedd80ad64ee71169cf9922f1f2cb53887.zip
Style on config_addr_policy_intersectes, which looks ok to me.
svn:r5998
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 77836c2a4a..37d99f754c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3237,19 +3237,17 @@ config_addr_policy_covers(addr_policy_t *a, addr_policy_t *b)
/** Return true iff the address policies <b>a</b> and <b>b</b> intersect, that
* is, there exists an address/port that is covered by <b>a</b> that is also
* covered by <b>b</b>.
- *
- * XXX: somebody needs to doublecheck the IP logic. -- PP
- * */
+ */
static int
config_addr_policy_intersects(addr_policy_t *a, addr_policy_t *b)
{
/* All the bits we care about are those that are set in both
* netmasks. If they are equal in a and b's networkaddresses
* then the networks intersect. If there is a difference,
- * then they do not' */
- if (!( ((a->addr ^ b->addr) & a->msk & b->msk) == 0 ))
+ * then they do not. */
+ if (((a->addr ^ b->addr) & a->msk & b->msk) != 0)
return 0;
- if (a->prt_max < b->prt_min || b->prt_max < a->prt_min)
+ if (a->prt_max < b->prt_min || b->prt_max < a->prt_min)
return 0;
return 1;
}