"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/vendor/golang.org/x/net/route/address.go" between
go1.14.7.src.tar.gz and go1.15.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language. Latest stable release (1.15).

address.go  (go1.14.7.src):address.go  (go1.15.src)
skipping to change at line 49 skipping to change at line 49
return 0, errInvalidAddr return 0, errInvalidAddr
} }
b[0] = byte(l) b[0] = byte(l)
b[1] = sysAF_LINK b[1] = sysAF_LINK
if a.Index > 0 { if a.Index > 0 {
nativeEndian.PutUint16(b[2:4], uint16(a.Index)) nativeEndian.PutUint16(b[2:4], uint16(a.Index))
} }
data := b[8:] data := b[8:]
if nlen > 0 { if nlen > 0 {
b[5] = byte(nlen) b[5] = byte(nlen)
copy(data[:nlen], a.Addr) copy(data[:nlen], a.Name)
data = data[nlen:] data = data[nlen:]
} }
if alen > 0 { if alen > 0 {
b[6] = byte(alen) b[6] = byte(alen)
copy(data[:alen], a.Name) copy(data[:alen], a.Addr)
data = data[alen:] data = data[alen:]
} }
return ll, nil return ll, nil
} }
func parseLinkAddr(b []byte) (Addr, error) { func parseLinkAddr(b []byte) (Addr, error) {
if len(b) < 8 { if len(b) < 8 {
return nil, errInvalidAddr return nil, errInvalidAddr
} }
_, a, err := parseKernelLinkAddr(sysAF_LINK, b[4:]) _, a, err := parseKernelLinkAddr(sysAF_LINK, b[4:])
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)