Преглед на файлове

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.
Mike Perry преди 16 години
родител
ревизия
18689317e4
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/or/circuitbuild.c

+ 1 - 1
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);