Skip to content

Commit 2c66d63

Browse files
committed
resolved further pr comments
1 parent ab7038d commit 2c66d63

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

npm/pkg/dataplane/dataplane_windows.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,14 +378,12 @@ func (dp *DataPlane) getLocalPodEndpoints() ([]*hcn.HostComputeEndpoint, error)
378378
func GetUniqueEndpoints(endpoints, endpointsAttached []hcn.HostComputeEndpoint) []hcn.HostComputeEndpoint {
379379
// Store IDs of endpoints list in a map for quick lookup
380380
idMap := make(map[string]struct{}, len(endpoints))
381-
for i := 0; i < len(endpoints); i++ {
382-
ep := &(endpoints)[i]
381+
for _, ep := range endpoints {
383382
idMap[ep.Id] = struct{}{}
384383
}
385384

386385
// Add endpointsAttached list endpoints in endpoints list if the endpoint is not in the map
387-
for i := 0; i < len(endpointsAttached); i++ {
388-
ep := endpointsAttached[i]
386+
for _, ep := range endpointsAttached {
389387
if _, ok := idMap[ep.Id]; !ok {
390388
endpoints = append(endpoints, ep)
391389
}

0 commit comments

Comments
 (0)