lock: Make some cleanup and moving the code around. (#2718)

This patch just avoids lot of ifs and inverts some logic.
This commit is contained in:
Harshavardhana
2016-09-19 13:14:55 -07:00
committed by GitHub
parent a955676986
commit 113b93346b
11 changed files with 335 additions and 204 deletions

View File

@@ -435,7 +435,7 @@ func TestErasureReadFileRandomOffsetLength(t *testing.T) {
}
// To generate random offset/length.
r := rand.New(rand.NewSource(time.Now().UnixNano()))
r := rand.New(rand.NewSource(time.Now().UTC().UnixNano()))
// create pool buffer which will be used by erasureReadFile for
// reading from disks and erasure decoding.