summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-01-16 13:53:23 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-17 15:26:43 +0000
commitff77941a31352c40d13bdac3786e84e916f2bc94 (patch)
tree0fe16d41451255b55c68165426d7cf082463873a /libpod/container.go
parent54e258bfde8f6164abf3cd0e6d8d18b1643cc91d (diff)
downloadpodman-ff77941a31352c40d13bdac3786e84e916f2bc94.tar.gz
podman-ff77941a31352c40d13bdac3786e84e916f2bc94.tar.bz2
podman-ff77941a31352c40d13bdac3786e84e916f2bc94.zip
Fix in-memory state tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/container.go b/libpod/container.go
index 4d6fe3a5e..2ee87163d 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -336,7 +336,11 @@ func (c *Container) Dependencies() []string {
dependsCtrs[c.config.CgroupNsCtr] = true
}
- depends := make([]string, len(dependsCtrs), 0)
+ if len(dependsCtrs) == 0 {
+ return []string{}
+ }
+
+ depends := make([]string, 0, len(dependsCtrs))
for ctr, _ := range dependsCtrs {
depends = append(depends, ctr)
}