From fa27369b59ff74ac1092cf4d7fa648a3d8963241 Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Thu, 2 Jan 2025 16:21:03 +0100 Subject: [PATCH] Fix linter issues --- client/firewall/uspfilter/localip.go | 2 +- client/firewall/uspfilter/localip_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/firewall/uspfilter/localip.go b/client/firewall/uspfilter/localip.go index 9636e1cc9..48ffa44f3 100644 --- a/client/firewall/uspfilter/localip.go +++ b/client/firewall/uspfilter/localip.go @@ -52,7 +52,7 @@ func (m *localIPManager) processIP(ip net.IP, newIPv4Bitmap *[1 << 16]uint32, ip if _, exists := ipv4Set[ipStr]; !exists { ipv4Set[ipStr] = struct{}{} *ipv4Addresses = append(*ipv4Addresses, ipStr) - (*newIPv4Bitmap)[high] |= 1 << (low % 32) + newIPv4Bitmap[high] |= 1 << (low % 32) } } return nil diff --git a/client/firewall/uspfilter/localip_test.go b/client/firewall/uspfilter/localip_test.go index f179fb2e3..91c5d52c5 100644 --- a/client/firewall/uspfilter/localip_test.go +++ b/client/firewall/uspfilter/localip_test.go @@ -52,6 +52,7 @@ func BenchmarkIPChecks(b *testing.B) { ip := interfaces[4] b.ResetTimer() for i := 0; i < b.N; i++ { + // nolint:gosimple _, _ = mapManager.localIPs[ip.String()] } }) @@ -60,6 +61,7 @@ func BenchmarkIPChecks(b *testing.B) { ip := interfaces[12] b.ResetTimer() for i := 0; i < b.N; i++ { + // nolint:gosimple _, _ = mapManager.localIPs[ip.String()] } })