Merge pull request #1506 from stenya/develop

Fix ineffective break statement.
This commit is contained in:
Daniel Hååvi
2024-04-17 12:22:58 +02:00
committed by GitHub

View File

@@ -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)
@@ -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)
}