Merge pull request #2678 from cxmcc/minor

Minor code simplification for Containers api
This commit is contained in:
Michael Crosby 2013-11-21 16:27:15 -08:00
commit d6e6214d37

View file

@ -697,14 +697,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