From: Daniel Wagner <[email protected]>
need_split is never checked in the 'if' because the continue in
the above 'if' body jumps early back to the iterator.
Reported by coverty.
---
src/service.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/src/service.c b/src/service.c
index 8753247..acdb001 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3628,26 +3628,14 @@ static gboolean run_vpn_auto_connect(gpointer data) {
for (list = service_list; list; list = list->next) {
struct connman_service *service = list->data;
- bool need_split = false;
int res;
if (service->type != CONNMAN_SERVICE_TYPE_VPN)
continue;
- if (is_connected(service) || is_connecting(service)) {
- if (!service->do_split_routing)
- need_split = true;
- continue;
- }
-
if (is_ignore(service) || !service->favorite)
continue;
- if (need_split && !service->do_split_routing) {
- DBG("service %p no split routing", service);
- continue;
- }
-
DBG("service %p %s %s", service, service->name,
service->do_split_routing ?
"split routing" : "");
@@ -3655,9 +3643,6 @@ static gboolean run_vpn_auto_connect(gpointer data) {
res = __connman_service_connect(service);
if (res < 0 && res != -EINPROGRESS)
continue;
-
- if (!service->do_split_routing)
- need_split = true;
}
return FALSE;
--
1.8.4.474.g128a96c
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman