From 0c3f9111f503e77c64d0141b2de6a2318d19b94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:55:58 +0900 Subject: [PATCH] chore: make lint happy --- gold/p2p/udplite/init.go | 2 +- gold/p2p/udplite/lite.go | 4 ++-- gold/p2p/udplite/udp.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gold/p2p/udplite/init.go b/gold/p2p/udplite/init.go index 70dfbdd..a7896f1 100644 --- a/gold/p2p/udplite/init.go +++ b/gold/p2p/udplite/init.go @@ -1,4 +1,4 @@ -//go:build !darwin +//go:build !darwin && !windows package udplite diff --git a/gold/p2p/udplite/lite.go b/gold/p2p/udplite/lite.go index a65a21b..4a4e234 100644 --- a/gold/p2p/udplite/lite.go +++ b/gold/p2p/udplite/lite.go @@ -1,4 +1,4 @@ -//go:build !darwin +//go:build !darwin && !windows package udplite @@ -49,7 +49,7 @@ func (sl *sysListener) listenUDP(ctx context.Context, laddr *net.UDPAddr) (*net. sockladdr := sockaddrinterfaceinstance *(**net.UDPAddr)(unsafe.Add(unsafe.Pointer(&sockladdr), unsafe.Sizeof(uintptr(0)))) = laddr sockraddr := sockaddrinterfaceinstance - sockraddr = nil + *(**net.UDPAddr)(unsafe.Add(unsafe.Pointer(&sockraddr), unsafe.Sizeof(uintptr(0)))) = nil fd, err := internetSocket(ctx, sl.network, sockladdr, sockraddr, syscall.SOCK_DGRAM, IPPROTO_UDPLITE, "listen", ctrlCtxFn) if err != nil { return nil, err diff --git a/gold/p2p/udplite/udp.go b/gold/p2p/udplite/udp.go index 1da509a..7905fc4 100644 --- a/gold/p2p/udplite/udp.go +++ b/gold/p2p/udplite/udp.go @@ -1,4 +1,4 @@ -//go:build !darwin +//go:build !darwin && !windows package udplite