Browse Source

core: fix bogus gcc-4.4 warning

Andrei Pelinescu-Onciul 15 năm trước cách đây
mục cha
commit
3a99415a7d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      ip_addr.h

+ 1 - 1
ip_addr.h

@@ -696,7 +696,7 @@ static inline char* su2a(union sockaddr_union* su, int su_len)
 		if (unlikely(su_len<sizeof(su->sin6)))
 		if (unlikely(su_len<sizeof(su->sin6)))
 			return "<addr. error>";
 			return "<addr. error>";
 		buf[0]='[';
 		buf[0]='[';
-		offs=1+ip6tosbuf((unsigned char*)&su->sin6.sin6_addr, &buf[1],
+		offs=1+ip6tosbuf((unsigned char*)su->sin6.sin6_addr.s6_addr, &buf[1],
 							sizeof(buf)-4);
 							sizeof(buf)-4);
 		buf[offs]=']';
 		buf[offs]=']';
 		offs++;
 		offs++;