mirror of
https://github.com/containers/podman.git
synced 2025-11-29 09:37:38 +08:00
preallocate paths in SetupRootless
Just a minor improvement as we know the size needed for the slice we can allocate it only once instead of the append having to resize it. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -83,7 +83,7 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, noMoveProcess bool,
|
||||
return err
|
||||
}
|
||||
|
||||
paths := []string{}
|
||||
paths := make([]string, 0, len(ctrs))
|
||||
for _, ctr := range ctrs {
|
||||
paths = append(paths, ctr.ConfigNoCopy().ConmonPidFile)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user