mirror of git://git.sysmocom.de/ofono
call-forwarding: Make cf_cond_find more readable
This commit is contained in:
parent
e53723e3c6
commit
bed9f4e09b
|
@ -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)
|
static struct ofono_call_forwarding_condition *cf_cond_find(GSList *l, int cls)
|
||||||
{
|
{
|
||||||
for (; l; l = l->next)
|
struct ofono_call_forwarding_condition *c;
|
||||||
if (((struct ofono_call_forwarding_condition *)
|
|
||||||
(l->data))->cls == cls)
|
for (; l; l = l->next) {
|
||||||
return l->data;
|
c = l->data;
|
||||||
|
|
||||||
|
if (c->cls == cls)
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue