From fa201681e188ef28b8397f6b20dbf8ceb998e962 Mon Sep 17 00:00:00 2001 From: jfreegman Date: Wed, 28 Feb 2024 09:40:50 -0500 Subject: [PATCH] cleanup: Remove useless if clause --- toxcore/Messenger.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index d20d740577..d6dc24d37a 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -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. */