unix: remove duplicate comment regarding sockaddr conversions
Change-Id: Ib916857732274ec4a7e425a9038b8435bccd5d9a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/248779
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/syscall_internal_linux_test.go b/unix/syscall_internal_linux_test.go
index 7156c3d..40d3aca 100644
--- a/unix/syscall_internal_linux_test.go
+++ b/unix/syscall_internal_linux_test.go
@@ -576,15 +576,10 @@
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
}