From 477a3266e9a0506ab87739a0f3cc646ecc632df0 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Fri, 20 Jan 2017 11:02:45 +0100 Subject: [PATCH] clear the code --- coreapi/friendlist.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c index 444321bdc..7acf390d3 100644 --- a/coreapi/friendlist.c +++ b/coreapi/friendlist.c @@ -499,19 +499,11 @@ static LinphoneFriendListStatus _linphone_friend_list_add_friend(LinphoneFriendL return status; } addr = linphone_friend_get_address(lf); - bool_t present= FALSE; + bool_t present = FALSE; if (lf->refkey) { - if(linphone_friend_list_find_friend_by_ref_key(list, lf->refkey)) { - present = TRUE; - } else { - present = FALSE; - } + present = linphone_friend_list_find_friend_by_ref_key(list, lf->refkey) != NULL; } else { - if (bctbx_list_find(list->friends, lf) != NULL) { - present = TRUE; - } else { - present = FALSE; - } + present = bctbx_list_find(list->friends, lf) != NULL; } if (present) { char *tmp = NULL;