Return Option<String> from dc_decrypt_setup_file

This commit is contained in:
Alexander Krotov
2019-09-25 13:27:06 +03:00
parent b93550f6c8
commit 20ae7f15e9
2 changed files with 19 additions and 26 deletions

View File

@@ -251,8 +251,9 @@ unsafe fn stress_functions(context: &Context) {
assert!(preferencrypt_0.is_null());
free(buf_1 as *mut libc::c_void);
buf_1 = dc_decrypt_setup_file(context, S_EM_SETUPCODE, S_EM_SETUPFILE);
assert!(!buf_1.is_null());
let decrypted = dc_decrypt_setup_file(context, S_EM_SETUPCODE, S_EM_SETUPFILE).unwrap();
buf_1 = decrypted.strdup();
assert!(dc_split_armored_data(
buf_1,
&mut headerline_0,