Commit ee16b91f authored by Olivier Crête's avatar Olivier Crête

agent: Remove useless checks from priv_add_remote_candidate

parent 5aa6553b
...@@ -1976,9 +1976,8 @@ static gboolean priv_add_remote_candidate ( ...@@ -1976,9 +1976,8 @@ static gboolean priv_add_remote_candidate (
candidate = nice_candidate_new (type); candidate = nice_candidate_new (type);
if (candidate) { if (candidate) {
GSList *modified_list = g_slist_append (component->remote_candidates, candidate); component->remote_candidates = g_slist_append (component->remote_candidates,
if (modified_list) { candidate);
component->remote_candidates = modified_list;
candidate->stream_id = stream_id; candidate->stream_id = stream_id;
candidate->component_id = component_id; candidate->component_id = component_id;
...@@ -2011,9 +2010,6 @@ static gboolean priv_add_remote_candidate ( ...@@ -2011,9 +2010,6 @@ static gboolean priv_add_remote_candidate (
if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0) if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0)
error_flag = TRUE; error_flag = TRUE;
} }
else /* memory alloc error: list insert */
error_flag = TRUE;
}
else /* memory alloc error: candidate creation */ else /* memory alloc error: candidate creation */
error_flag = TRUE; error_flag = 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