Merge pull request #651 from justinclift/issue649v1
Remove redundant check of error var e
This commit is contained in:
commit
6b88d3b5d0
2 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ func (b *Local) Load(h restic.Handle, p []byte, off int64) (n int, err error) {
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
e := f.Close()
|
e := f.Close()
|
||||||
if err == nil && e != nil {
|
if err == nil {
|
||||||
err = errors.Wrap(e, "Close")
|
err = errors.Wrap(e, "Close")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
|
@ -345,7 +345,7 @@ func (r *SFTP) Load(h restic.Handle, p []byte, off int64) (n int, err error) {
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
e := f.Close()
|
e := f.Close()
|
||||||
if err == nil && e != nil {
|
if err == nil {
|
||||||
err = errors.Wrap(e, "Close")
|
err = errors.Wrap(e, "Close")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
Loading…
Reference in a new issue