net: make use of IPv4len, IPv6len

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4926046
This commit is contained in:
Mikio Hara 2011-08-24 13:59:33 -04:00 committed by Russ Cox
parent 6ecd5f9fe7
commit 80f79ad305
4 changed files with 5 additions and 5 deletions

View file

@ -113,7 +113,7 @@ func convertRR_A(records []dnsRR) []IP {
func convertRR_AAAA(records []dnsRR) []IP {
addrs := make([]IP, len(records))
for i, rr := range records {
a := make(IP, 16)
a := make(IP, IPv6len)
copy(a, rr.(*dnsRR_AAAA).AAAA[:])
addrs[i] = a
}