mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4073 from gyuho/remove_seed
storage: remove unnecessary math/rand seed
This commit is contained in:
commit
70bcde89bc
@ -18,7 +18,6 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"math"
|
"math"
|
||||||
mrand "math/rand"
|
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
@ -845,7 +844,6 @@ func (i *fakeIndex) Equal(b index) bool { return false }
|
|||||||
func createBytesSlice(bytesN, sliceN int) [][]byte {
|
func createBytesSlice(bytesN, sliceN int) [][]byte {
|
||||||
rs := [][]byte{}
|
rs := [][]byte{}
|
||||||
for len(rs) != sliceN {
|
for len(rs) != sliceN {
|
||||||
mrand.Seed(time.Now().UnixNano())
|
|
||||||
v := make([]byte, bytesN)
|
v := make([]byte, bytesN)
|
||||||
if _, err := rand.Read(v); err != nil {
|
if _, err := rand.Read(v); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user