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:
parent
157cd6ef3a
commit
18941a75b7
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user