Skip to content

Commit

Permalink
[fix] (Windows;performance) Ineffective break statement. Did you mean…
Browse files Browse the repository at this point in the history
… to break out of the outer loop?
  • Loading branch information
stenya committed Apr 12, 2024
1 parent 1ec4216 commit 6251111
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/network/iphelper/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (ipHelper *IPHelper) getTable(ipVersion, protocol uint8) (connections []*so
maxTries := 5
usedBufSize := lbf.getBufSize()
var buf []byte

triesLoop:
for i := 1; i <= maxTries; i++ {
bufSizeParam := usedBufSize
buf = make([]byte, bufSizeParam)
Expand Down Expand Up @@ -256,7 +256,7 @@ func (ipHelper *IPHelper) getTable(ipVersion, protocol uint8) (connections []*so
return nil, nil, fmt.Errorf("invalid parameter: [NT 0x%X] %s", r1, err)
case windows.NO_ERROR:
// success
break
break triesLoop
default:
return nil, nil, fmt.Errorf("unexpected error: [NT 0x%X] %s", r1, err)
}
Expand Down

0 comments on commit 6251111

Please sign in to comment.