Merge branch 'maint-0.3.3' into maint-0.3.4

This commit is contained in:
Nick Mathewson
2018-10-30 09:34:04 -04:00
2 changed files with 9 additions and 9 deletions
+4 -9
View File
@@ -190,8 +190,7 @@ pub extern "C" fn protover_get_supported_protocols() -> *const c_char {
#[no_mangle]
pub extern "C" fn protover_compute_vote(
list: *const Stringlist,
threshold: c_int,
allow_long_proto_names: bool,
threshold: c_int
) -> *mut c_char {
if list.is_null() {
@@ -206,13 +205,9 @@ pub extern "C" fn protover_compute_vote(
let mut proto_entries: Vec<UnvalidatedProtoEntry> = Vec::new();
for datum in data {
let entry: UnvalidatedProtoEntry = match allow_long_proto_names {
true => match UnvalidatedProtoEntry::from_str_any_len(datum.as_str()) {
Ok(n) => n,
Err(_) => continue},
false => match datum.parse() {
Ok(n) => n,
Err(_) => continue},
let entry: UnvalidatedProtoEntry = match datum.parse() {
Ok(n) => n,
Err(_) => continue
};
proto_entries.push(entry);
}