From 354f231ae1a9ca2d3a6a1a7c5d40b1213d761675 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Thu, 8 Oct 2015 13:13:40 -0700 Subject: [PATCH] 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 Reviewed-by: Ian Lance Taylor --- unix/sockcmsg_unix.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/sockcmsg_unix.go b/unix/sockcmsg_unix.go index 6668bec7..70af5a72 100644 --- a/unix/sockcmsg_unix.go +++ b/unix/sockcmsg_unix.go @@ -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 }