Commit be2706da authored by Olivier Crête's avatar Olivier Crête 👻

discovery: Remove useless checks from priv_add_local_candidate_pruned

parent 920e299a
...@@ -252,7 +252,7 @@ void refresh_cancel (CandidateRefresh *refresh) ...@@ -252,7 +252,7 @@ void refresh_cancel (CandidateRefresh *refresh)
*/ */
static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandidate *candidate) static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandidate *candidate)
{ {
GSList *modified_list, *i; GSList *i;
for (i = component->local_candidates; i ; i = i->next) { for (i = component->local_candidates; i ; i = i->next) {
NiceCandidate *c = i->data; NiceCandidate *c = i->data;
...@@ -264,11 +264,8 @@ static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandi ...@@ -264,11 +264,8 @@ static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandi
} }
} }
modified_list = g_slist_append (component->local_candidates, component->local_candidates = g_slist_append (component->local_candidates,
candidate); candidate);
if (modified_list) {
component->local_candidates = modified_list;
}
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment