forked from TrueCloudLab/restic
Remove redundant if ...; err != nil; return pattern
This commit is contained in:
parent
6ed73ed408
commit
319087c056
3 changed files with 3 additions and 14 deletions
|
@ -63,11 +63,7 @@ directories in an encrypted repository stored on different backends.
|
|||
|
||||
// run the debug functions for all subcommands (if build tag "debug" is
|
||||
// enabled)
|
||||
if err := runDebug(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return runDebug()
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -306,10 +306,7 @@ func (be *b2Backend) List(ctx context.Context, t restic.FileType, fn func(restic
|
|||
return err
|
||||
}
|
||||
}
|
||||
if err := iter.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return iter.Err()
|
||||
}
|
||||
|
||||
// Delete removes all restic keys in the bucket. It will not remove the bucket itself.
|
||||
|
|
|
@ -605,11 +605,7 @@ func (node *Node) fillExtra(path string, fi os.FileInfo) error {
|
|||
return errors.Errorf("invalid node type %q", node.Type)
|
||||
}
|
||||
|
||||
if err := node.fillExtendedAttributes(path); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return node.fillExtendedAttributes(path)
|
||||
}
|
||||
|
||||
func (node *Node) fillExtendedAttributes(path string) error {
|
||||
|
|
Loading…
Reference in a new issue