mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Resolve a division-by-zero complaint from coverity. CID 1397272
This commit is contained in:
parent
2a00110e5b
commit
23c09b6bc2
@ -638,7 +638,8 @@ choose_guard_selection(const or_options_t *options,
|
||||
*/
|
||||
|
||||
static int have_warned_extreme_threshold = 0;
|
||||
if (n_passing_filter < extreme_threshold &&
|
||||
if (n_guards &&
|
||||
n_passing_filter < extreme_threshold &&
|
||||
! have_warned_extreme_threshold) {
|
||||
have_warned_extreme_threshold = 1;
|
||||
const double exclude_frac =
|
||||
|
Loading…
Reference in New Issue
Block a user