summaryrefslogtreecommitdiffstats
path: root/src/call-forwarding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r--src/call-forwarding.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index 794eebca..b43e0436 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -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;
}