swarm: fix megacheck warnings

This commit is contained in:
Egon Elbre
2017-08-08 20:34:35 +03:00
parent 6ca59d98f8
commit 133de3d806
18 changed files with 39 additions and 108 deletions

View File

@@ -514,8 +514,7 @@ func (s *DbStore) setCapacity(c uint64) {
s.capacity = c
if s.entryCnt > c {
var ratio float32
ratio = float32(1.01) - float32(c)/float32(s.entryCnt)
ratio := float32(1.01) - float32(c)/float32(s.entryCnt)
if ratio < gcArrayFreeRatio {
ratio = gcArrayFreeRatio
}
@@ -528,10 +527,6 @@ func (s *DbStore) setCapacity(c uint64) {
}
}
func (s *DbStore) getEntryCnt() uint64 {
return s.entryCnt
}
func (s *DbStore) Close() {
s.db.Close()
}