From 9781c653f44323e2079cb1123720c32f9626be2c Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Mon, 17 Aug 2020 11:45:17 -0400 Subject: [PATCH] unix: remove duplicate comment regarding sockaddr conversions Change-Id: Ib916857732274ec4a7e425a9038b8435bccd5d9a Reviewed-on: https://go-review.googlesource.com/c/sys/+/248779 Run-TryBot: Matt Layher TryBot-Result: Gobot Gobot Reviewed-by: Tobias Klauser --- unix/syscall_internal_linux_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/unix/syscall_internal_linux_test.go b/unix/syscall_internal_linux_test.go index 7156c3dc..40d3aca8 100644 --- a/unix/syscall_internal_linux_test.go +++ b/unix/syscall_internal_linux_test.go @@ -576,15 +576,10 @@ func sockaddrL2TPIP6ToAny(in RawSockaddrL2TPIP6) *RawSockaddrAny { func sockaddrUnixToAny(in RawSockaddrUnix) *RawSockaddrAny { var out RawSockaddrAny - - // Explicitly copy the contents of in into out to produce the correct - // sockaddr structure, without relying on unsafe casting to a type of a - // larger size. copy( (*(*[SizeofSockaddrAny]byte)(unsafe.Pointer(&out)))[:], (*(*[SizeofSockaddrUnix]byte)(unsafe.Pointer(&in)))[:], ) - return &out }