From 3c2febb748600a051e276347b0bf0960421ca723 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Thu, 8 Oct 2015 12:43:57 -0700 Subject: [PATCH] syscall: fix vet warning in UnixRights Change-Id: Ic19c94fe0af55e17f6c2fcfd36085ccb1584da6f Reviewed-on: https://go-review.googlesource.com/15608 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/syscall/sockcmsg_unix.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/syscall/sockcmsg_unix.go b/src/syscall/sockcmsg_unix.go index 045a012c05..47242752f0 100644 --- a/src/syscall/sockcmsg_unix.go +++ b/src/syscall/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 } -- 2.50.0