mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
[fix] (Windows;performance) Ineffective break statement. Did you mean to break out of the outer loop?
This commit is contained in:
parent
1ec421603f
commit
6251111cdf
1 changed files with 2 additions and 2 deletions
|
@ -214,7 +214,7 @@ func (ipHelper *IPHelper) getTable(ipVersion, protocol uint8) (connections []*so
|
||||||
maxTries := 5
|
maxTries := 5
|
||||||
usedBufSize := lbf.getBufSize()
|
usedBufSize := lbf.getBufSize()
|
||||||
var buf []byte
|
var buf []byte
|
||||||
|
triesLoop:
|
||||||
for i := 1; i <= maxTries; i++ {
|
for i := 1; i <= maxTries; i++ {
|
||||||
bufSizeParam := usedBufSize
|
bufSizeParam := usedBufSize
|
||||||
buf = make([]byte, bufSizeParam)
|
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)
|
return nil, nil, fmt.Errorf("invalid parameter: [NT 0x%X] %s", r1, err)
|
||||||
case windows.NO_ERROR:
|
case windows.NO_ERROR:
|
||||||
// success
|
// success
|
||||||
break
|
break triesLoop
|
||||||
default:
|
default:
|
||||||
return nil, nil, fmt.Errorf("unexpected error: [NT 0x%X] %s", r1, err)
|
return nil, nil, fmt.Errorf("unexpected error: [NT 0x%X] %s", r1, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue