Ver código fonte

daemon: Daemon.getNetworkedContainer: remove intermediate var

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 ano atrás
pai
commit
12d8029d56
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1 2
      daemon/container_operations.go

+ 1 - 2
daemon/container_operations.go

@@ -992,8 +992,7 @@ func (daemon *Daemon) getNetworkedContainer(containerID, connectedContainerID st
 		return nil, fmt.Errorf("cannot join own network")
 	}
 	if !nc.IsRunning() {
-		err := fmt.Errorf("cannot join network of a non running container: %s", connectedContainerID)
-		return nil, errdefs.Conflict(err)
+		return nil, errdefs.Conflict(fmt.Errorf("cannot join network of a non running container: %s", connectedContainerID))
 	}
 	if nc.IsRestarting() {
 		return nil, errContainerIsRestarting(connectedContainerID)