1
0
mirror of https://github.com/golang/go synced 2024-11-22 03:24:41 -07:00

syscall: Correct length of SockaddrUnix.

R=rsc
CC=golang-dev
https://golang.org/cl/4025041
This commit is contained in:
Ian Lance Taylor 2011-01-14 10:50:51 -08:00
parent 157cd6ef3a
commit 18941a75b7

View File

@ -257,8 +257,8 @@ func (sa *SockaddrUnix) sockaddr() (uintptr, _Socklen, int) {
sa.raw.Path[0] = 0 sa.raw.Path[0] = 0
} }
// length is family, name, NUL. // length is family (uint16), name, NUL.
return uintptr(unsafe.Pointer(&sa.raw)), 1 + _Socklen(n) + 1, 0 return uintptr(unsafe.Pointer(&sa.raw)), 2 + _Socklen(n) + 1, 0
} }
type SockaddrLinklayer struct { type SockaddrLinklayer struct {