[PATCH autoconf v3 01/12] ipconfig: Remove unnecessary null checks.

Jukka Rissanen jukka.rissanen at nokia.com
Fri Jan 7 04:55:08 PST 2011


---
 src/network.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/network.c b/src/network.c
index 3130f7c..18e3099 100644
--- a/src/network.c
+++ b/src/network.c
@@ -745,15 +745,8 @@ static gboolean set_connected(gpointer user_data)
 	DBG("service %p ipv4 %p ipv6 %p", service, ipconfig_ipv4,
 		ipconfig_ipv6);
 
-	if (ipconfig_ipv4)
-		ipv4_method = __connman_ipconfig_get_method(ipconfig_ipv4);
-	else
-		ipv4_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN;
-
-	if (ipconfig_ipv6)
-		ipv6_method = __connman_ipconfig_get_method(ipconfig_ipv6);
-	else
-		ipv6_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN;
+	ipv4_method = __connman_ipconfig_get_method(ipconfig_ipv4);
+	ipv6_method = __connman_ipconfig_get_method(ipconfig_ipv6);
 
 	DBG("method ipv4 %d ipv6 %d", ipv4_method, ipv6_method);
 	DBG("network connected %d", network->connected);
-- 
1.7.0.4




More information about the connman mailing list