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:
commit
5035fa1e21
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue