Fix errors found in coverity scan

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-04-30 16:25:45 -04:00
parent 1218d70915
commit 7d37f4bbfe
2 changed files with 2 additions and 1 deletions

View File

@ -236,7 +236,7 @@ func (r *Runtime) removePod(ctx context.Context, p *Pod, removeCtrs, force bool)
} }
if err := r.removeContainer(ctx, ctr, force, false, true); err != nil { if err := r.removeContainer(ctx, ctr, force, false, true); err != nil {
if removalErr != nil { if removalErr == nil {
removalErr = err removalErr = err
} else { } else {
logrus.Errorf("Error removing container %s from pod %s: %v", ctr.ID(), p.ID(), err) logrus.Errorf("Error removing container %s from pod %s: %v", ctr.ID(), p.ID(), err)

View File

@ -108,6 +108,7 @@ func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string
if foundZ { if foundZ {
return nil, errors.Wrapf(ErrDupeMntOption, "only one of 'z' and 'Z' can be used") return nil, errors.Wrapf(ErrDupeMntOption, "only one of 'z' and 'Z' can be used")
} }
foundZ = true
default: default:
return nil, errors.Wrapf(ErrBadMntOption, "unknown mount option %q", opt) return nil, errors.Wrapf(ErrBadMntOption, "unknown mount option %q", opt)
} }