libnetwork: Endpoint.Iface, Endpoint.Interface remove redundant "if"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-27 13:56:10 +02:00
parent 5b53ddfcdd
commit f8181b8875
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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