aboutsummaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-04-05 09:40:51 -0400
committerNick Mathewson <nickm@torproject.org>2016-04-14 16:24:28 -0400
commita885271c08d2337b35c203c0b27509d0aa32dbf6 (patch)
tree0cb88f3d43fcc7a90be972d958d3146c1294c06b /src/or/policies.c
parent7865402106e9af273b9c887484b8371a899683ad (diff)
downloadtor-a885271c08d2337b35c203c0b27509d0aa32dbf6.tar.gz
tor-a885271c08d2337b35c203c0b27509d0aa32dbf6.zip
Add new tor_assert_nonfatal*() macros.
Unlike tor_assert(), these macros don't abort the process. They're good for checking conditions we want to warn about, but which don't warrant a full crash. This commit also changes the default implementation for tor_fragile_assert() to tor_assert_nonfatal_unreached_once(). Closes ticket 18613.
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index f9718b6a95..2703d7edef 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -103,7 +103,7 @@ policy_expand_private(smartlist_t **policy)
if (tor_addr_parse_mask_ports(private_nets[i], 0,
&newpolicy.addr,
&newpolicy.maskbits, &port_min, &port_max)<0) {
- tor_assert(0);
+ tor_assert_unreached();
}
smartlist_add(tmp, addr_policy_get_canonical_entry(&newpolicy));
}