diff --git a/profiles/network/connection.c b/profiles/network/connection.c
index 4b30aa3..671478c 100644
--- a/profiles/network/connection.c
+++ b/profiles/network/connection.c
error("Too many bnep connection attempts");
} else {
error("bnep connection setup TO, retrying...");
- if (!bnep_send_conn_req(nc))
+ if (bnep_send_conn_req(nc) == 0)
return TRUE;
}
int err;
nc->attempt_cnt = 0;
- if ((err = bnep_send_conn_req(nc)))
+
+ err = bnep_send_conn_req(nc);
+ if (err < 0)
return err;
nc->timeout_source = g_timeout_add_seconds(CON_SETUP_TO,