postContainersCreate: minor nitpick

There are two if statements checking for exactly same conditions:

> if hostConfig != nil && versions.LessThan(version, "1.40")

Merge these.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2019-03-08 15:58:30 -08:00
parent 33c3200e0d
commit ce7528ebdf
1 changed files with 1 additions and 3 deletions

View File

@ -474,10 +474,8 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo
}
// Ignore KernelMemoryTCP because it was added in API 1.40.
hostConfig.KernelMemoryTCP = 0
}
// Ignore Capabilities because it was added in API 1.40.
if hostConfig != nil && versions.LessThan(version, "1.40") {
// Ignore Capabilities because it was added in API 1.40.
hostConfig.Capabilities = nil
}