Skip to content

Commit

Permalink
Merge pull request #68053 from Pingan2017/rmifblock
Browse files Browse the repository at this point in the history
clean up unneeded else block
  • Loading branch information
k8s-ci-robot committed Sep 25, 2018
2 parents fdd9c2e + 2f1284b commit 8346631
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions pkg/kubelet/cm/cgroup_manager_linux.go
Expand Up @@ -204,18 +204,16 @@ func NewCgroupManager(cs *CgroupSubsystems, cgroupDriver string) CgroupManager {
func (m *cgroupManagerImpl) Name(name CgroupName) string {
if m.adapter.cgroupManagerType == libcontainerSystemd {
return name.ToSystemd()
} else {
return name.ToCgroupfs()
}
return name.ToCgroupfs()
}

// CgroupName converts the literal cgroupfs name on the host to an internal identifier.
func (m *cgroupManagerImpl) CgroupName(name string) CgroupName {
if m.adapter.cgroupManagerType == libcontainerSystemd {
return ParseSystemdToCgroupName(name)
} else {
return ParseCgroupfsToCgroupName(name)
}
return ParseCgroupfsToCgroupName(name)
}

// buildCgroupPaths builds a path to each cgroup subsystem for the specified name.
Expand Down
3 changes: 1 addition & 2 deletions pkg/kubelet/cm/pod_container_manager_linux.go
Expand Up @@ -139,9 +139,8 @@ func (m *podContainerManagerImpl) killOnePid(pid int) error {
// also does this.
glog.V(3).Infof("process with pid %v no longer exists", pid)
return nil
} else {
return err
}
return err
}
return nil
}
Expand Down

0 comments on commit 8346631

Please sign in to comment.