forked from TrueCloudLab/frostfs-node
[#498] audit: skip unnecessary statement
Signed-off-by: ZhangTao1596 <zhangtao@ngd.neo.org>
This commit is contained in:
parent
59de521fd1
commit
2877a343c3
1 changed files with 3 additions and 5 deletions
|
@ -11,14 +11,12 @@ func nextRandUint64(n uint64, exclude map[uint64]struct{}) uint64 {
|
||||||
|
|
||||||
ind := randUint64(n - ln)
|
ind := randUint64(n - ln)
|
||||||
|
|
||||||
for i := uint64(0); ; i++ {
|
for i := ind; ; i++ {
|
||||||
if i >= ind {
|
|
||||||
if _, ok := exclude[i]; !ok {
|
if _, ok := exclude[i]; !ok {
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// returns random uint64 number [0, n).
|
// returns random uint64 number [0, n).
|
||||||
func randUint64(n uint64) uint64 {
|
func randUint64(n uint64) uint64 {
|
||||||
|
|
Loading…
Reference in a new issue