mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
Add an assertion to compute_weighted_bandwidths()
This should please coverity, and fix CID 1415722. It didn't understand that networkstatus_get_param() always returns a value between its minimum and maximum values.
This commit is contained in:
parent
55690d05bd
commit
96e310911f
1 changed files with 1 additions and 0 deletions
|
@ -585,6 +585,7 @@ compute_weighted_bandwidths(const smartlist_t *sl,
|
|||
}
|
||||
|
||||
weight_scale = networkstatus_get_weight_scale_param(NULL);
|
||||
tor_assert(weight_scale >= 1);
|
||||
|
||||
if (rule == WEIGHT_FOR_GUARD) {
|
||||
Wg = networkstatus_get_bw_weight(NULL, "Wgg", -1);
|
||||
|
|
Loading…
Add table
Reference in a new issue