aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2024-02-19 12:01:22 -0600
committerDenis Kenzior <denkenz@gmail.com>2024-02-26 09:30:10 -0600
commit77e48c6c5158b6753f93a364cd1d564b16aaf73c (patch)
treeef046a06b6a7ec139e66403512a92cef7d4487fd
parent050196bb42144999b6fc9e3814d6f2fe4c824a0b (diff)
downloadofono-77e48c6c5158b6753f93a364cd1d564b16aaf73c.tar.gz
voicecall: Remove g_strfreev and g_strdupv use
Replace by l_strv_free and l_strv_copy
-rw-r--r--src/voicecall.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index 6d677a9a7..a69a7f4d1 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -1092,14 +1092,11 @@ static int voicecalls_path_list(struct ofono_voicecall *vc, GSList *call_list,
int i;
struct voicecall *v;
- *objlist = g_new0(char *, g_slist_length(call_list) + 1);
-
- if (*objlist == NULL)
- return -1;
+ *objlist = l_new(char *, g_slist_length(call_list) + 1);
for (i = 0, l = call_list; l; l = l->next, i++) {
v = l->data;
- (*objlist)[i] = g_strdup(voicecall_build_path(vc, v->call));
+ (*objlist)[i] = l_strdup(voicecall_build_path(vc, v->call));
}
return 0;
@@ -1926,7 +1923,7 @@ static void multiparty_callback_common(struct ofono_voicecall *vc,
dbus_message_iter_close_container(&iter, &array_iter);
- g_strfreev(objpath_list);
+ l_strv_free(objpath_list);
}
static void private_chat_callback(const struct ofono_error *error, void *data)
@@ -2747,9 +2744,9 @@ check:
void ofono_voicecall_en_list_notify(struct ofono_voicecall *vc,
char **nw_en_list)
{
- g_strfreev(vc->nw_en_list);
+ l_strv_free(vc->nw_en_list);
- vc->nw_en_list = g_strdupv(nw_en_list);
+ vc->nw_en_list = l_strv_copy(nw_en_list);
set_new_ecc(vc);
}
@@ -2882,7 +2879,7 @@ static void voicecall_unregister(struct ofono_atom *atom)
free_sim_ecc_numbers(vc, FALSE);
if (vc->nw_en_list) {
- g_strfreev(vc->nw_en_list);
+ l_strv_free(vc->nw_en_list);
vc->nw_en_list = NULL;
}