瀏覽代碼

more type punning warnings fixed

Andrei Pelinescu-Onciul 17 年之前
父節點
當前提交
9881d84d55
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules_s/ctl/init_socks.c

+ 1 - 1
modules_s/ctl/init_socks.c

@@ -216,7 +216,7 @@ int init_tcpudp_sock(union sockaddr_union* sa_un, char* address, int port,
 		LOG(L_ERR, "ERROR: init_tcpudp_sock: set non blocking failed\n");
 	}
 	
-	if (bind(s, (struct sockaddr *)&su, sockaddru_len(su))==-1){
+	if (bind(s, &su.s, sockaddru_len(su))==-1){
 		LOG(L_ERR, "ERROR: init_tcpudp_sock: bind: %s [%d]\n",
 				strerror(errno), errno);
 		goto error;