Replace types that use only 0 and 1 with bool (#18) (#58)

* Start replacing int with bool where possible (#18)

* Continue replacing int with bool where possible (#18)

* Continue replacing int with bool where possible (#18)

* Run fmt
This commit is contained in:
Hocuri
2019-05-11 12:07:09 +02:00
committed by Lars-Magnus Skog
parent 7266b64c66
commit 569c924a0c
17 changed files with 196 additions and 208 deletions

View File

@@ -363,13 +363,12 @@ unsafe fn fingerprint_equals_sender(
let peerstate: *mut dc_apeerstate_t = dc_apeerstate_new(context);
let mut fingerprint_normalized: *mut libc::c_char = 0 as *mut libc::c_char;
if !(dc_array_get_cnt(contacts) != 1) {
if !(0
== dc_contact_load_from_db(
contact,
&context.sql.clone().read().unwrap(),
dc_array_get_id(contacts, 0i32 as size_t),
)
|| 0 == dc_apeerstate_load_by_addr(
if !(!dc_contact_load_from_db(
contact,
&context.sql.clone().read().unwrap(),
dc_array_get_id(contacts, 0i32 as size_t),
) || 0
== dc_apeerstate_load_by_addr(
peerstate,
&context.sql.clone().read().unwrap(),
(*contact).addr,