summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-11 18:53:26 +0200
committerGitHub <noreply@github.com>2019-10-11 18:53:26 +0200
commiteb6ca054fc93e5f863581e72923cb1e80fc5ab88 (patch)
tree9db4869ef57712dd8c874fbe35a66f47ee7b37ec /cmd/podman
parentcd167fc9e099a388b0245ca9529b2e0772914fd7 (diff)
parentf7d55d64e7040cdad149684234ea150b0a90cf0e (diff)
downloadpodman-eb6ca054fc93e5f863581e72923cb1e80fc5ab88.tar.gz
podman-eb6ca054fc93e5f863581e72923cb1e80fc5ab88.tar.bz2
podman-eb6ca054fc93e5f863581e72923cb1e80fc5ab88.zip
Merge pull request #4237 from giuseppe/ps-not-null
container: initialize results list
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/shared/container.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go
index 022377b1f..15bbb46d2 100644
--- a/cmd/podman/shared/container.go
+++ b/cmd/podman/shared/container.go
@@ -449,10 +449,8 @@ func GetPsContainerOutput(r *libpod.Runtime, opts PsOptions, filters []string, m
// PBatch performs batch operations on a container in parallel. It spawns the
// number of workers relative to the number of parallel operations desired.
func PBatch(containers []*libpod.Container, workers int, opts PsOptions) []PsContainerOutput {
- var (
- wg sync.WaitGroup
- psResults []PsContainerOutput
- )
+ var wg sync.WaitGroup
+ psResults := []PsContainerOutput{}
// If the number of containers in question is less than the number of
// proposed parallel operations, we shouldnt spawn so many workers.