Skip to content

Commit

Permalink
cleanup: Remove useless if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
JFreegman committed Mar 28, 2024
1 parent 7572888 commit fa20168
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2468,14 +2468,12 @@ static void do_friends(Messenger *m, void *userdata)
}
}

if (m->friendlist[i].status == FRIEND_REQUESTED
|| m->friendlist[i].status == FRIEND_CONFIRMED) { /* friend is not online. */
if (m->friendlist[i].status == FRIEND_REQUESTED) {
/* If we didn't connect to friend after successfully sending him a friend request the request is deemed
* unsuccessful so we set the status back to FRIEND_ADDED and try again.
*/
check_friend_request_timed_out(m, i, temp_time, userdata);
}
if (m->friendlist[i].status == FRIEND_REQUESTED) {
/* If we didn't connect to friend after successfully sending him a friend
* request the request is deemed unsuccessful so we set the status back to
* FRIEND_ADDED and try again.
*/
check_friend_request_timed_out(m, i, temp_time, userdata);
}

if (m->friendlist[i].status == FRIEND_ONLINE) { /* friend is online. */
Expand Down

0 comments on commit fa20168

Please sign in to comment.