From: Mike Perry Date: Wed, 7 Oct 2009 20:05:28 +0000 (-0700) Subject: Tweak an assert that shouldn't fire either way. X-Git-Tag: tor-0.2.2.4-alpha~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18689317e43dd5d33193d850220232addd7c0d16;p=thirdparty%2Ftor.git Tweak an assert that shouldn't fire either way. There were however other places where we used to call this function that might have caused this to fire. Better safe than sorry now. --- diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 0ff7f272f4..54edccc9a7 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -650,7 +650,7 @@ circuit_build_times_initial_alpha(circuit_build_times_t *cbt, // CircBuildTimeout = Xm*((1-0.8))^(-1/a)) // ln(CircBuildTimeout) = ln(Xm)+ln(((1-0.8)))*(-1/a) // -ln(1-0.8)/(ln(CircBuildTimeout)-ln(Xm))=a - tor_assert(quantile > 0); + tor_assert(quantile >= 0); tor_assert(cbt->Xm > 0); cbt->alpha = ln(1.0-quantile)/(ln(cbt->Xm)-ln(timeout_ms)); tor_assert(cbt->alpha > 0);