From 78f6332de40bb5edaaaa99c8fd13f422616a63b1 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 947edef7e12..561908a8d78 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. */