aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-10-27 09:31:32 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-10-27 09:31:32 +0200
commit825889cc7e5c980fb09971a05983bc42ac503ba4 (patch)
tree2ebb05bef1feb0704c8f1c1aab3aee802613e3e3 /utils
parent9fbf2a40f19e1aea97e46e6e7c7992996f8ca827 (diff)
downloadpodman-825889cc7e5c980fb09971a05983bc42ac503ba4.tar.gz
podman-825889cc7e5c980fb09971a05983bc42ac503ba4.tar.bz2
podman-825889cc7e5c980fb09971a05983bc42ac503ba4.zip
utils: do not overwrite the err variable
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/utils.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/utils.go b/utils/utils.go
index b08630d2f..55af41bb3 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -191,8 +191,8 @@ func moveProcessToScope(pidPath, slice, scope string) error {
func MovePauseProcessToScope(pausePidPath string) {
err := moveProcessToScope(pausePidPath, "user.slice", "podman-pause.scope")
if err != nil {
- unified, err := cgroups.IsCgroup2UnifiedMode()
- if err != nil {
+ unified, err2 := cgroups.IsCgroup2UnifiedMode()
+ if err2 != nil {
logrus.Warnf("Failed to detect if running with cgroup unified: %v", err)
}
if RunsOnSystemd() && unified {