summaryrefslogtreecommitdiffstats
path: root/src/call-forwarding.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-04-23 15:31:29 -0500
committerDenis Kenzior <denkenz@gmail.com>2012-04-23 15:31:29 -0500
commitbed9f4e09b164c6c62ee3ee526daa2a22a478f66 (patch)
treeda357bca07a759d919296e0fc4253e0411c890de /src/call-forwarding.c
parente53723e3c636ca626fbf4c7be583808f658415c2 (diff)
downloadofono-bed9f4e09b164c6c62ee3ee526daa2a22a478f66.tar.bz2
call-forwarding: Make cf_cond_find more readable
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;
}