fusefrontend: Remove unnecessary check in doRead function.

The same condition is already checked a few lines above, and 'err' is not
changed inbetween.
This commit is contained in:
Sebastian Lackner 2018-12-26 22:22:40 +01:00 committed by rfjakob
parent 1ced0b192e
commit 4c2ff26457
1 changed files with 2 additions and 4 deletions

View File

@ -162,10 +162,8 @@ func (f *File) doRead(dst []byte, off uint64, length uint64) ([]byte, fuse.Statu
// Empty file
return nil, fuse.OK
}
if err != nil {
tlog.Warn.Printf("doRead %d: corrupt header: %v", f.qIno.Ino, err)
return nil, fuse.EIO
}
tlog.Warn.Printf("doRead %d: corrupt header: %v", f.qIno.Ino, err)
return nil, fuse.EIO
}
// Save into the file table
f.fileTableEntry.ID = fileID