From 0013aa7d9f74eab1c6d02cf9f7b35a1b9364b17a Mon Sep 17 00:00:00 2001 From: Xiuming Chen Date: Wed, 13 Nov 2013 01:29:00 -0800 Subject: [PATCH] Minor code simplification for Containers api --- server.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server.go b/server.go index 6a5d0a3294..a83463144f 100644 --- a/server.go +++ b/server.go @@ -464,14 +464,11 @@ func (srv *Server) Containers(all, size bool, n int, since, before string) []API if !container.State.Running && !all && n == -1 && since == "" && before == "" { continue } - if before != "" { + if before != "" && !foundBefore { if container.ID == before || utils.TruncateID(container.ID) == before { foundBefore = true - continue - } - if !foundBefore { - continue } + continue } if displayed == n { break