libnetwork: Endpoint.InterfaceName: remove redundant nil check

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-29 19:50:55 +02:00
parent a49b71b481
commit 1dcb11f81d
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -272,12 +272,7 @@ func (epi *EndpointInterface) SetNames(srcName string, dstPrefix string) error {
func (ep *Endpoint) InterfaceName() driverapi.InterfaceNameInfo {
ep.mu.Lock()
defer ep.mu.Unlock()
if ep.iface != nil {
return ep.iface
}
return nil
return ep.iface
}
// AddStaticRoute adds a route to the sandbox.