1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #11162 from SvenDowideit/if-nil-call-with-nil

Seems like an un-necessary if statement
This commit is contained in:
Alexander Morozov 2015-03-04 13:59:27 -08:00
commit 5035fa1e21

View file

@ -508,11 +508,7 @@ func Allocate(job *engine.Job) engine.Status {
globalIPv6 net.IP
)
if requestedIP != nil {
ip, err = ipallocator.RequestIP(bridgeIPv4Network, requestedIP)
} else {
ip, err = ipallocator.RequestIP(bridgeIPv4Network, nil)
}
ip, err = ipallocator.RequestIP(bridgeIPv4Network, requestedIP)
if err != nil {
return job.Error(err)
}