diff mbox series

[01/22] gprs: Remove g_strfreev and g_strdupv use

Message ID 20240226033724.1460079-1-denkenz@gmail.com (mailing list archive)
State Superseded, archived
Headers show
Series [01/22] gprs: Remove g_strfreev and g_strdupv use | expand

Commit Message

Denis Kenzior Feb. 26, 2024, 3:36 a.m. UTC
Replace by l_strfreev and l_strv_copy
---
 src/gprs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/src/gprs.c b/src/gprs.c
index dbf9b0605b7c..67f0d7803525 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -328,7 +328,7 @@  static void context_settings_free(struct context_settings *settings)
 		g_free(settings->ipv4->ip);
 		g_free(settings->ipv4->netmask);
 		g_free(settings->ipv4->gateway);
-		g_strfreev(settings->ipv4->dns);
+		l_strfreev(settings->ipv4->dns);
 		g_free(settings->ipv4->proxy);
 
 		g_free(settings->ipv4);
@@ -338,7 +338,7 @@  static void context_settings_free(struct context_settings *settings)
 	if (settings->ipv6) {
 		g_free(settings->ipv6->ip);
 		g_free(settings->ipv6->gateway);
-		g_strfreev(settings->ipv6->dns);
+		l_strfreev(settings->ipv6->dns);
 
 		g_free(settings->ipv6);
 		settings->ipv6 = NULL;
@@ -2940,8 +2940,8 @@  void ofono_gprs_context_set_ipv4_dns_servers(struct ofono_gprs_context *gc,
 	if (settings->ipv4 == NULL)
 		return;
 
-	g_strfreev(settings->ipv4->dns);
-	settings->ipv4->dns = g_strdupv((char **) dns);
+	l_strfreev(settings->ipv4->dns);
+	settings->ipv4->dns = l_strv_copy((char **) dns);
 }
 
 void ofono_gprs_context_set_ipv6_address(struct ofono_gprs_context *gc,
@@ -2987,8 +2987,8 @@  void ofono_gprs_context_set_ipv6_dns_servers(struct ofono_gprs_context *gc,
 	if (settings->ipv6 == NULL)
 		return;
 
-	g_strfreev(settings->ipv6->dns);
-	settings->ipv6->dns = g_strdupv((char **) dns);
+	l_strfreev(settings->ipv6->dns);
+	settings->ipv6->dns = l_strv_copy((char **) dns);
 }
 
 static void free_contexts(struct ofono_gprs *gprs)