diff options
author | Adin Scannell <ascannell@google.com> | 2021-01-12 12:36:17 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-12 12:38:22 -0800 |
commit | 4e03e87547853523d4ff941935a6ef1712518c61 (patch) | |
tree | e930ce0e5f15f7041e7b74daca05acc7afbd2558 /pkg/tcpip/network/ipv6 | |
parent | a20da708291e2e5bdece5176dce61c1b4b10b7d9 (diff) |
Fix simple mistakes identified by goreportcard.
These are primarily simplification and lint mistakes. However, minor
fixes are also included and tests added where appropriate.
PiperOrigin-RevId: 351425971
Diffstat (limited to 'pkg/tcpip/network/ipv6')
-rw-r--r-- | pkg/tcpip/network/ipv6/icmp_test.go | 2 | ||||
-rw-r--r-- | pkg/tcpip/network/ipv6/mld_test.go | 2 | ||||
-rw-r--r-- | pkg/tcpip/network/ipv6/ndp_test.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/network/ipv6/icmp_test.go b/pkg/tcpip/network/ipv6/icmp_test.go index 34a6a8446..bbce1ef78 100644 --- a/pkg/tcpip/network/ipv6/icmp_test.go +++ b/pkg/tcpip/network/ipv6/icmp_test.go @@ -1535,7 +1535,7 @@ func TestPacketQueing(t *testing.T) { } s.SetRouteTable([]tcpip.Route{ - tcpip.Route{ + { Destination: host1IPv6Addr.AddressWithPrefix.Subnet(), NIC: nicID, }, diff --git a/pkg/tcpip/network/ipv6/mld_test.go b/pkg/tcpip/network/ipv6/mld_test.go index e2778b656..f6ffa7133 100644 --- a/pkg/tcpip/network/ipv6/mld_test.go +++ b/pkg/tcpip/network/ipv6/mld_test.go @@ -267,7 +267,7 @@ func TestSendQueuedMLDReports(t *testing.T) { globalMulticastAddr: false, linkLocalAddrSNMC: false, } - for _ = range addrs { + for range addrs { p, ok := e.Read() if !ok { t.Fatalf("expected MLD report for %s and %s; addrs = %#v", globalMulticastAddr, linkLocalAddrSNMC, addrs) diff --git a/pkg/tcpip/network/ipv6/ndp_test.go b/pkg/tcpip/network/ipv6/ndp_test.go index 7ddb19c00..b1a5a5510 100644 --- a/pkg/tcpip/network/ipv6/ndp_test.go +++ b/pkg/tcpip/network/ipv6/ndp_test.go @@ -581,7 +581,7 @@ func TestNeighorSolicitationResponse(t *testing.T) { } s.SetRouteTable([]tcpip.Route{ - tcpip.Route{ + { Destination: header.IPv6EmptySubnet, NIC: 1, }, |