mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-10 09:50:26 +08:00
Enable govet nilness, fix an issue
The code already checked if err == nil above, so the linter complains: > libcontainer/container_linux.go:534:18: nilness: tautological condition: non-nil != nil (govet) > } else if err != nil { > ^ Fix the issue, enable the check. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -531,7 +531,7 @@ func (c *Container) newParentProcess(p *Process) (parentProcess, error) {
|
||||
logrus.Debug("runc-dmz: using runc-dmz") // used for tests
|
||||
} else if errors.Is(err, dmz.ErrNoDmzBinary) {
|
||||
logrus.Debug("runc-dmz binary not embedded in runc binary, falling back to /proc/self/exe clone")
|
||||
} else if err != nil {
|
||||
} else {
|
||||
return nil, fmt.Errorf("failed to create runc-dmz binary clone: %w", err)
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user