Selaa lähdekoodia

daemon: Daemon.getNetworkedContainer: remove intermediate var

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 vuotta sitten
vanhempi
commit
12d8029d56
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  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)