mirror of
https://github.com/pgsty/minio.git
synced 2026-07-15 16:30:29 +03:00
Fix lint issues from v1.62.0 upgrade (#20633)
* Fix lint issues from v1.62.0 upgrade * Fix xlMetaV2TrimData version checks.
This commit is contained in:
@@ -2247,12 +2247,12 @@ func getEndpointsLocalAddr(endpointServerPools EndpointServerPools) string {
|
||||
}
|
||||
|
||||
// fetches a random number between range min-max.
|
||||
func getRandomRange(min, max int, seed int64) int {
|
||||
func getRandomRange(minN, maxN int, seed int64) int {
|
||||
// special value -1 means no explicit seeding.
|
||||
if seed != -1 {
|
||||
rand.Seed(seed)
|
||||
if seed == -1 {
|
||||
return rand.New(rand.NewSource(time.Now().UnixNano())).Intn(maxN-minN) + minN
|
||||
}
|
||||
return rand.Intn(max-min) + min
|
||||
return rand.New(rand.NewSource(seed)).Intn(maxN-minN) + minN
|
||||
}
|
||||
|
||||
// Randomizes the order of bytes in the byte array
|
||||
|
||||
Reference in New Issue
Block a user