Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Remove useless if clause #2717

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading