diff mbox series

[13/90] connection: Rename 'active_gateway' local.

Message ID 20231206235056.322578-14-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Add Gateway Low-priority Default Routes for Non-default Services | expand

Commit Message

Grant Erickson Dec. 6, 2023, 11:49 p.m. UTC
From: Grant Erickson <erick205@umn.edu>

In '__connman_connection_update_gateway' there is a local variable
inside a loop control block, 'active_gateway'. This renames this local
varable to 'current_gateway' to avoid any confusion with the term
"active" which has implications for the 'ACTIVE' gateway configuration
state, which is definitely not the case for this local.
---
 src/connection.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/src/connection.c b/src/connection.c
index d81ed8648175..e80443c02a5a 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -2102,27 +2102,27 @@  bool __connman_connection_update_gateway(void)
 	g_hash_table_iter_init(&iter, gateway_hash);
 
 	while (g_hash_table_iter_next(&iter, &key, &value)) {
-		struct gateway_data *active_gateway = value;
+		struct gateway_data *current_gateway = value;
 
-		GATEWAY_DATA_DBG("active_gateway", active_gateway);
+		GATEWAY_DATA_DBG("current_gateway", current_gateway);
 
-		if (active_gateway == default_gateway)
+		if (current_gateway == default_gateway)
 			continue;
 
-		if (active_gateway->ipv4_config &&
+		if (current_gateway->ipv4_config &&
 				is_gateway_config_state_active(
-					active_gateway->ipv4_config)) {
+					current_gateway->ipv4_config)) {
 
-			UNSET_DEFAULT_GATEWAY(active_gateway,
+			UNSET_DEFAULT_GATEWAY(current_gateway,
 						CONNMAN_IPCONFIG_TYPE_IPV4);
 			updated = true;
 		}
 
-		if (active_gateway->ipv6_config &&
+		if (current_gateway->ipv6_config &&
 				is_gateway_config_state_active(
-					active_gateway->ipv6_config)) {
+					current_gateway->ipv6_config)) {
 
-			UNSET_DEFAULT_GATEWAY(active_gateway,
+			UNSET_DEFAULT_GATEWAY(current_gateway,
 						CONNMAN_IPCONFIG_TYPE_IPV6);
 			updated = true;
 		}