Merge pull request #17790 from TomSweeneyRedHat/dev/tsweeney/pick17755

[v4.4.1-rhel] Use append() to add elements to a slice (restore)
This commit is contained in:
OpenShift Merge Robot 2023-03-16 11:15:22 -04:00 • committed by GitHub
commit ffc2614b8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -673,7 +673,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
}
ctrs = make([]*libpod.Container, 0, len(containers))
for i := range containers {
ctrs[i] = containers[i].Container
ctrs = append(ctrs, containers[i].Container)
}
default:
for _, nameOrID := range namesOrIds {