cmd/geth, core/rawdb: add missing error checks (#19871)

* Added missing error checks

Add error handling where we assign err a value, but don't check for it being nil.

* core/rawdb: tiny style nit
This commit is contained in:
Christian Muehlhaeuser
2019-07-22 09:51:13 +02:00
committed by Péter Szilágyi
parent cc3ef1e4f4
commit 57fc1d21e1
3 changed files with 21 additions and 1 deletions

View File

@ -272,7 +272,9 @@ func (t *freezerTable) repair() error {
if newLastIndex.filenum != lastIndex.filenum {
// Release earlier opened file
t.releaseFile(lastIndex.filenum)
t.head, err = t.openFile(newLastIndex.filenum, openFreezerFileForAppend)
if t.head, err = t.openFile(newLastIndex.filenum, openFreezerFileForAppend); err != nil {
return err
}
if stat, err = t.head.Stat(); err != nil {
// TODO, anything more we can do here?
// A data file has gone missing...