From 4c2ff26457471cd36b25c29fb3f982b27002ce3c Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 26 Dec 2018 22:22:40 +0100 Subject: fusefrontend: Remove unnecessary check in doRead function. The same condition is already checked a few lines above, and 'err' is not changed inbetween. --- internal/fusefrontend/file.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 9230bed..04ae526 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -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 -- cgit v1.2.3