2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 23:06:32 +00:00

Remove redundant check of error var e

As per #649
This commit is contained in:
Justin Clift 2016-10-25 18:10:53 +01:00
parent d4f76fbe26
commit ecc1f92787
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ func (b *Local) Load(h restic.Handle, p []byte, off int64) (n int, err error) {
defer func() {
e := f.Close()
if err == nil && e != nil {
if err == nil {
err = errors.Wrap(e, "Close")
}
}()

View File

@ -345,7 +345,7 @@ func (r *SFTP) Load(h restic.Handle, p []byte, off int64) (n int, err error) {
defer func() {
e := f.Close()
if err == nil && e != nil {
if err == nil {
err = errors.Wrap(e, "Close")
}
}()