Skip to content

Commit

Permalink
Fixing errors found by go vet (#731)
Browse files Browse the repository at this point in the history
* Fixing errors found by go vet

* corrected the error checking
  • Loading branch information
Lucas Wang authored and manishrjain committed Mar 7, 2019
1 parent 6b97bac commit 75e07ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (db *DB) Close() (err error) {
db.closers.writes.SignalAndWait()

// Now close the value log.
if vlogErr := db.vlog.Close(); err == nil {
if vlogErr := db.vlog.Close(); vlogErr != nil {
err = errors.Wrap(vlogErr, "DB.Close")
}

Expand Down Expand Up @@ -602,7 +602,7 @@ func (db *DB) writeRequests(reqs []*request) error {
}
count += len(b.Entries)
var i uint64
for err := db.ensureRoomForWrite(); err == errNoRoom; err = db.ensureRoomForWrite() {
for err = db.ensureRoomForWrite(); err == errNoRoom; err = db.ensureRoomForWrite() {
i++
if i%100 == 0 {
db.elog.Printf("Making room for writes")
Expand Down

0 comments on commit 75e07ee

Please sign in to comment.