call-forwarding: Make cf_cond_find more readable

This commit is contained in:
Denis Kenzior 2012-04-23 15:31:29 -05:00
parent e53723e3c6
commit bed9f4e09b
1 changed files with 8 additions and 4 deletions

View File

@ -96,10 +96,14 @@ static gint cf_cond_compare(gconstpointer a, gconstpointer b)
static struct ofono_call_forwarding_condition *cf_cond_find(GSList *l, int cls)
{
for (; l; l = l->next)
if (((struct ofono_call_forwarding_condition *)
(l->data))->cls == cls)
return l->data;
struct ofono_call_forwarding_condition *c;
for (; l; l = l->next) {
c = l->data;
if (c->cls == cls)
return c;
}
return NULL;
}