mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
pkg/emulation: remove slice copying
Copying the slice is not necessary here since registeredBinfmtMisc always creates the slice from scratch. This commit is part of series fixing issues reported by prealloc linter from golangci-lint v2.8.0. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -7,12 +7,10 @@ import "github.com/sirupsen/logrus"
|
||||
// Registered returns a list of platforms for which we think we have user
|
||||
// space emulation available.
|
||||
func Registered() []string {
|
||||
var registered []string
|
||||
binfmt, err := registeredBinfmtMisc()
|
||||
registered, err := registeredBinfmtMisc()
|
||||
if err != nil {
|
||||
logrus.Warnf("registeredBinfmtMisc(): %v", err)
|
||||
return nil
|
||||
}
|
||||
registered = append(registered, binfmt...)
|
||||
return registered
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user