Commit 354f231a authored by Matthew Dempsky's avatar Matthew Dempsky

unix: fix vet warning in UnixRights

Same fix as golang.org/cl/15608 for package syscall.

Change-Id: I8de2369220e58140596325d7ea16c015aab90d1b
Reviewed-on: https://go-review.googlesource.com/15609
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 18d75a3b
......@@ -77,10 +77,10 @@ func UnixRights(fds ...int) []byte {
h.Level = SOL_SOCKET
h.Type = SCM_RIGHTS
h.SetLen(CmsgLen(datalen))
data := uintptr(cmsgData(h))
data := cmsgData(h)
for _, fd := range fds {
*(*int32)(unsafe.Pointer(data)) = int32(fd)
data += 4
*(*int32)(data) = int32(fd)
data = unsafe.Pointer(uintptr(data) + 4)
}
return b
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment