diff options
author | Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> | 2012-03-13 15:46:22 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-03-19 13:33:10 -0500 |
commit | 021b2145d4eb3454d9032cbaf6febb68733edfc2 (patch) | |
tree | a074cd6bbea57df31aa6b1773843af9f5e038185 /src/call-forwarding.c | |
parent | 0efaa9975a36b56edd39f6583c2c11a68fdc7f6e (diff) | |
download | ofono-021b2145d4eb3454d9032cbaf6febb68733edfc2.tar.bz2 |
call-forwarding: Remove cf_list_clear()
Use g_slist_free_full() instead.
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r-- | src/call-forwarding.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c index 864be1b5..08573625 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -183,22 +183,12 @@ static GSList *cf_cond_list_create(int total, return l; } -static inline void cf_list_clear(GSList *cf_list) -{ - GSList *l; - - for (l = cf_list; l; l = l->next) - g_free(l->data); - - g_slist_free(cf_list); -} - static inline void cf_clear_all(struct ofono_call_forwarding *cf) { int i; for (i = 0; i < 4; i++) { - cf_list_clear(cf->cf_conditions[i]); + g_slist_free_full(cf->cf_conditions[i], g_free); cf->cf_conditions[i] = NULL; } } @@ -422,7 +412,7 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf, &timeout); } - cf_list_clear(old); + g_slist_free_full(old, g_free); cf->cf_conditions[type] = list; if (update_sim == TRUE) |