diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-07-07 11:07:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-07 11:08:28 -0400 |
commit | 67b6ba6f2f2cb95ab534052a0e25eb4f5185e41c (patch) | |
tree | e2d1c4cfade5349afef733885cacc8e62f125a68 /src/or/dirvote.c | |
parent | aa792fd20a2a26c5bd4bb4a2d62ab89bcc55f2c5 (diff) | |
download | tor-67b6ba6f2f2cb95ab534052a0e25eb4f5185e41c.tar.gz tor-67b6ba6f2f2cb95ab534052a0e25eb4f5185e41c.zip |
Avoid a scan_build warning in dirvote_get_intermediate_param_value
Fixes bug 21495.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index f5e29eb786..11cd020d88 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -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 |