mirror of
https://github.com/golang/go
synced 2024-11-22 02:54:39 -07:00
syscall: Correct length of SockaddrUnix.
R=rsc CC=golang-dev https://golang.org/cl/4025041
This commit is contained in:
parent
157cd6ef3a
commit
18941a75b7
@ -257,8 +257,8 @@ func (sa *SockaddrUnix) sockaddr() (uintptr, _Socklen, int) {
|
||||
sa.raw.Path[0] = 0
|
||||
}
|
||||
|
||||
// length is family, name, NUL.
|
||||
return uintptr(unsafe.Pointer(&sa.raw)), 1 + _Socklen(n) + 1, 0
|
||||
// length is family (uint16), name, NUL.
|
||||
return uintptr(unsafe.Pointer(&sa.raw)), 2 + _Socklen(n) + 1, 0
|
||||
}
|
||||
|
||||
type SockaddrLinklayer struct {
|
||||
|
Loading…
Reference in New Issue
Block a user