aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-15 09:25:04 -0400
committerDavid Goulet <dgoulet@torproject.org>2017-09-15 11:40:59 -0400
commit513d642a66b49f02143ec788bd699e5e9c81b4b3 (patch)
tree91640bfdc2c28d30162b81374e5b4f98da0c7ac9 /src
parent1033e14a693e8d80341428b592779fe145eb3152 (diff)
downloadtor-513d642a66b49f02143ec788bd699e5e9c81b4b3.tar.gz
tor-513d642a66b49f02143ec788bd699e5e9c81b4b3.zip
sched: Revert IF_BUG_ONCE() to tor_assert()
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r--src/or/scheduler.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/or/scheduler.c b/src/or/scheduler.c
index e2466c01a1..4a9f3dcaf6 100644
--- a/src/or/scheduler.c
+++ b/src/or/scheduler.c
@@ -224,19 +224,12 @@ scheduler_compare_channels, (const void *c1_v, const void *c2_v))
const circuitmux_policy_t *p1, *p2;
uintptr_t p1_i, p2_i;
+ tor_assert(c1_v);
+ tor_assert(c2_v);
+
c1 = (const channel_t *)(c1_v);
c2 = (const channel_t *)(c2_v);
- IF_BUG_ONCE(!c1 || !c2) {
- if (c1 && !c2) {
- return -1;
- } else if (c2 && !c1) {
- return 1;
- } else {
- return -1;
- }
- }
-
if (c1 != c2) {
if (circuitmux_get_policy(c1->cmux) ==
circuitmux_get_policy(c2->cmux)) {