mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
cleanup unneeded if block
This commit is contained in:
parent
8aea674681
commit
2f1284bc34
@ -204,18 +204,16 @@ func NewCgroupManager(cs *CgroupSubsystems, cgroupDriver string) CgroupManager {
|
|||||||
func (m *cgroupManagerImpl) Name(name CgroupName) string {
|
func (m *cgroupManagerImpl) Name(name CgroupName) string {
|
||||||
if m.adapter.cgroupManagerType == libcontainerSystemd {
|
if m.adapter.cgroupManagerType == libcontainerSystemd {
|
||||||
return name.ToSystemd()
|
return name.ToSystemd()
|
||||||
} else {
|
|
||||||
return name.ToCgroupfs()
|
|
||||||
}
|
}
|
||||||
|
return name.ToCgroupfs()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CgroupName converts the literal cgroupfs name on the host to an internal identifier.
|
// CgroupName converts the literal cgroupfs name on the host to an internal identifier.
|
||||||
func (m *cgroupManagerImpl) CgroupName(name string) CgroupName {
|
func (m *cgroupManagerImpl) CgroupName(name string) CgroupName {
|
||||||
if m.adapter.cgroupManagerType == libcontainerSystemd {
|
if m.adapter.cgroupManagerType == libcontainerSystemd {
|
||||||
return ParseSystemdToCgroupName(name)
|
return ParseSystemdToCgroupName(name)
|
||||||
} else {
|
|
||||||
return ParseCgroupfsToCgroupName(name)
|
|
||||||
}
|
}
|
||||||
|
return ParseCgroupfsToCgroupName(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// buildCgroupPaths builds a path to each cgroup subsystem for the specified name.
|
// buildCgroupPaths builds a path to each cgroup subsystem for the specified name.
|
||||||
|
@ -136,9 +136,8 @@ func (m *podContainerManagerImpl) killOnePid(pid int) error {
|
|||||||
// also does this.
|
// also does this.
|
||||||
glog.V(3).Infof("process with pid %v no longer exists", pid)
|
glog.V(3).Infof("process with pid %v no longer exists", pid)
|
||||||
return nil
|
return nil
|
||||||
} else {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user