docs/coding-style.txt M7: Don't initialize variable unnecessarily
socket function will always return a valid file descriptor for the new
socket or -1 on failure, so no need to explicitly initalize fd with -1.
---
 src/6to4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/6to4.c b/src/6to4.c
index 0e3a7a1..71a2882 100644
--- a/src/6to4.c
+++ b/src/6to4.c
@@ -63,7 +63,7 @@ static int tunnel_create(struct in_addr *addr)
 {
        struct ip_tunnel_parm p;
        struct ifreq ifr;
-       int fd = -1;
+       int fd;
        int ret;
 
        /* ip tunnel add tun6to4 mode sit remote any local 1.2.3.4 ttl 64 */
-- 
1.9.1

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to