projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e53723e
)
call-forwarding: Make cf_cond_find more readable
author
Denis Kenzior
<denkenz@gmail.com>
Mon, 23 Apr 2012 20:31:29 +0000
(15:31 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Mon, 23 Apr 2012 20:31:29 +0000
(15:31 -0500)
src/call-forwarding.c
patch
|
blob
|
history
diff --git
a/src/call-forwarding.c
b/src/call-forwarding.c
index
794eebc
..
b43e043
100644
(file)
--- 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;
}