1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-07 14:25:26 -04:00

Shorten BytesLiteral

This commit is contained in:
v2ray
2016-05-23 20:21:23 +02:00
parent 5b23d25e35
commit cfdda19834
10 changed files with 23 additions and 23 deletions

View File

@@ -42,7 +42,7 @@ func IPAddress(ip []byte) Address {
var addr ipv4Address = [4]byte{ip[0], ip[1], ip[2], ip[3]}
return &addr
case net.IPv6len:
if serial.BytesLiteral(ip[0:10]).All(0) && serial.BytesLiteral(ip[10:12]).All(0xff) {
if serial.BytesT(ip[0:10]).All(0) && serial.BytesT(ip[10:12]).All(0xff) {
return IPAddress(ip[12:16])
}
var addr ipv6Address = [16]byte{