Explorar o código

tls: fix compiler warning
- tls_config.c:61:19: warning: �t.val.s� is used uninitialized in this function [-Wuninitialized]

Ovidiu Sas %!s(int64=12) %!d(string=hai) anos
pai
achega
56f7a8b987
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/tls/tls_config.c

+ 1 - 1
modules/tls/tls_config.c

@@ -58,13 +58,13 @@ static int parse_ipv6(struct ip_addr* ip, cfg_token_t* token,
 	struct ip_addr* ipv6;
 	struct ip_addr* ipv6;
 	str ip6_str;
 	str ip6_str;
 
 
-	ip6_str.s = t.val.s;
 	while(1) {
 	while(1) {
 		ret = cfg_get_token(&t, st, 0);
 		ret = cfg_get_token(&t, st, 0);
 		if (ret != 0) goto err;
 		if (ret != 0) goto err;
 		if (t.type == ']') break;
 		if (t.type == ']') break;
 		if (t.type != CFG_TOKEN_ALPHA && t.type != ':') goto err;
 		if (t.type != CFG_TOKEN_ALPHA && t.type != ':') goto err;
 	}
 	}
+	ip6_str.s = t.val.s;
 	ip6_str.len = (int)(long)(t.val.s - ip6_str.s);
 	ip6_str.len = (int)(long)(t.val.s - ip6_str.s);
 
 
 	ipv6 = str2ip6(&ip6_str);
 	ipv6 = str2ip6(&ip6_str);