Minor code simplification for Containers api

This commit is contained in:
Xiuming Chen 2013-11-13 01:29:00 -08:00
Родитель 3885ef585b
Коммит 0013aa7d9f
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -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 == "" { if !container.State.Running && !all && n == -1 && since == "" && before == "" {
continue continue
} }
if before != "" { if before != "" && !foundBefore {
if container.ID == before || utils.TruncateID(container.ID) == before { if container.ID == before || utils.TruncateID(container.ID) == before {
foundBefore = true foundBefore = true
continue
}
if !foundBefore {
continue
} }
continue
} }
if displayed == n { if displayed == n {
break break