diff mbox series

[1/2] connection: Remove unused local variables.

Message ID 20231129231706.1306676-2-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series connection: Remove Unnecessary '__connman_service_get_index' Calls | expand

Commit Message

Grant Erickson Nov. 29, 2023, 11:17 p.m. UTC
In __connman_connection_gateway_remove, both 'index' and 'interface'
are set; however, neither are used. Remove these unused local
variables.
---
 src/connection.c | 10 ----------
 1 file changed, 10 deletions(-)
diff mbox series

Patch

diff --git a/src/connection.c b/src/connection.c
index 297af227a9c3..5a98b8d57c84 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1595,22 +1595,12 @@  void __connman_connection_gateway_remove(struct connman_service *service,
 	struct gateway_data *data = NULL;
 	bool set_default4 = false, set_default6 = false;
         bool do_ipv4 = false, do_ipv6 = false;
-	int index;
-	g_autofree char *interface = NULL;
 	int err;
 
 	DBG("service %p (%s) type %d (%s)",
 		service, maybe_null(connman_service_get_identifier(service)),
 		type, __connman_ipconfig_type2string(type));
 
-	index = __connman_service_get_index(service);
-	if (index < 0)
-		return;
-
-	interface = connman_inet_ifname(index);
-
-	DBG("index %d (%s)", index, maybe_null(interface));
-
 	if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
 		do_ipv4 = true;
 	else if (type == CONNMAN_IPCONFIG_TYPE_IPV6)