mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
Make dc_split_armored_data return bool (#251)
* Make dc_split_armored_data return bool * Remove double negations
This commit is contained in:
committed by
Lars-Magnus Skog
parent
9314a5a8fd
commit
707c8c2830
@@ -1031,19 +1031,17 @@ pub unsafe fn dc_msg_get_setupcodebegin(msg: *const dc_msg_t) -> *mut libc::c_ch
|
||||
|| buf.is_null()
|
||||
|| buf_bytes <= 0)
|
||||
{
|
||||
if !(0
|
||||
== dc_split_armored_data(
|
||||
buf,
|
||||
&mut buf_headerline,
|
||||
&mut buf_setupcodebegin,
|
||||
0 as *mut *const libc::c_char,
|
||||
0 as *mut *const libc::c_char,
|
||||
)
|
||||
|| strcmp(
|
||||
buf_headerline,
|
||||
b"-----BEGIN PGP MESSAGE-----\x00" as *const u8 as *const libc::c_char,
|
||||
) != 0i32
|
||||
|| buf_setupcodebegin.is_null())
|
||||
if dc_split_armored_data(
|
||||
buf,
|
||||
&mut buf_headerline,
|
||||
&mut buf_setupcodebegin,
|
||||
0 as *mut *const libc::c_char,
|
||||
0 as *mut *const libc::c_char,
|
||||
) && strcmp(
|
||||
buf_headerline,
|
||||
b"-----BEGIN PGP MESSAGE-----\x00" as *const u8 as *const libc::c_char,
|
||||
) == 0
|
||||
&& !buf_setupcodebegin.is_null()
|
||||
{
|
||||
ret = dc_strdup(buf_setupcodebegin)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user