aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-04-30 16:25:45 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-05-01 15:00:33 -0400
commit7d37f4bbfee8def704cf38ec74f91e3e0db61723 (patch)
tree2f0b11e37e0cfa5e923ef74d88fbea6894c01ab0
parent1218d70915cd4f3edb3c595101626e7924cbe1c6 (diff)
downloadpodman-7d37f4bbfee8def704cf38ec74f91e3e0db61723.tar.gz
podman-7d37f4bbfee8def704cf38ec74f91e3e0db61723.tar.bz2
podman-7d37f4bbfee8def704cf38ec74f91e3e0db61723.zip
Fix errors found in coverity scan
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
-rw-r--r--libpod/runtime_pod_linux.go2
-rw-r--r--pkg/util/mountOpts.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go
index 872e8ea8a..73b6c5d9b 100644
--- a/libpod/runtime_pod_linux.go
+++ b/libpod/runtime_pod_linux.go
@@ -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 removalErr != nil {
+ if removalErr == nil {
removalErr = err
} else {
logrus.Errorf("Error removing container %s from pod %s: %v", ctr.ID(), p.ID(), err)
diff --git a/pkg/util/mountOpts.go b/pkg/util/mountOpts.go
index 329a7c913..929223244 100644
--- a/pkg/util/mountOpts.go
+++ b/pkg/util/mountOpts.go
@@ -108,6 +108,7 @@ func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string
if foundZ {
return nil, errors.Wrapf(ErrDupeMntOption, "only one of 'z' and 'Z' can be used")
}
+ foundZ = true
default:
return nil, errors.Wrapf(ErrBadMntOption, "unknown mount option %q", opt)
}