Skip to content
Snippets Groups Projects
Commit 67b6ba6f authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Avoid a scan_build warning in dirvote_get_intermediate_param_value

Fixes bug 21495.
parent aa792fd2
No related branches found
No related tags found
No related merge requests found
......@@ -737,12 +737,12 @@ dirvote_get_intermediate_param_value(const smartlist_t *param_list,
}
} SMARTLIST_FOREACH_END(k_v_pair);
if (n_found == 1)
if (n_found == 1) {
return value;
else if (BUG(n_found > 1))
return default_val;
else
} else {
tor_assert_nonfatal(n_found == 0);
return default_val;
}
}
/** Minimum number of directory authorities voting for a parameter to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment