From 735f3364a4f2182f3e3e1b84f39a042e86987967 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Thu, 11 May 2023 09:58:44 +0200 Subject: [PATCH] remove init --- src/net/cgo_unix_cgo_darwin.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/net/cgo_unix_cgo_darwin.go b/src/net/cgo_unix_cgo_darwin.go index fa21265c8c..40d5e426f2 100644 --- a/src/net/cgo_unix_cgo_darwin.go +++ b/src/net/cgo_unix_cgo_darwin.go @@ -16,11 +16,6 @@ import ( "unsafe" ) -func init() { - const expected_size = unsafe.Sizeof(C.struct___res_state{}) - const got_size = unsafe.Sizeof(unix.ResState{}) - - // This will cause a compile error when the size of - // unix.ResState is too small. - var _ [got_size - expected_size]byte -} +// This will cause a compile error when the size of +// unix.ResState is too small. +type _ [unsafe.Sizeof(unix.ResState{}) - unsafe.Sizeof(C.struct___res_state{})]byte