瀏覽代碼

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

Ovidiu Sas 12 年之前
父節點
當前提交
56f7a8b987
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
 	str ip6_str;
 
-	ip6_str.s = t.val.s;
 	while(1) {
 		ret = cfg_get_token(&t, st, 0);
 		if (ret != 0) goto err;
 		if (t.type == ']') break;
 		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);
 
 	ipv6 = str2ip6(&ip6_str);