From bed9f4e09b164c6c62ee3ee526daa2a22a478f66 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 23 Apr 2012 15:31:29 -0500 Subject: [PATCH] call-forwarding: Make cf_cond_find more readable --- src/call-forwarding.c | 12 ++++++++---- 1 file 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; }