libnetwork: Endpoint.Iface, Endpoint.Interface remove redundant "if"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
5b53ddfcdd
commit
f8181b8875
1 changed files with 2 additions and 12 deletions
|
@ -203,23 +203,13 @@ func (ep *Endpoint) Info() EndpointInfo {
|
|||
func (ep *Endpoint) Iface() *EndpointInterface {
|
||||
ep.mu.Lock()
|
||||
defer ep.mu.Unlock()
|
||||
|
||||
if ep.iface != nil {
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
return nil
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
func (ep *Endpoint) Interface() driverapi.InterfaceInfo {
|
||||
ep.mu.Lock()
|
||||
defer ep.mu.Unlock()
|
||||
|
||||
if ep.iface != nil {
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
return nil
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
// SetMacAddress allows the driver to set the mac address to the endpoint interface
|
||||
|
|
Loading…
Add table
Reference in a new issue