Parcourir la source

Merge pull request #17672 from LK4D4/unn_var

Remove unnecessary var decls
Antonio Murdaca il y a 9 ans
Parent
commit
0f41761290
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 2 4
      daemon/create_unix.go

+ 2 - 4
daemon/create_unix.go

@@ -16,11 +16,9 @@ import (
 
 // createContainerPlatformSpecificSettings performs platform specific container create functionality
 func createContainerPlatformSpecificSettings(container *Container, config *runconfig.Config, hostConfig *runconfig.HostConfig, img *image.Image) error {
-	var name, destination string
-
 	for spec := range config.Volumes {
-		name = stringid.GenerateNonCryptoID()
-		destination = filepath.Clean(spec)
+		name := stringid.GenerateNonCryptoID()
+		destination := filepath.Clean(spec)
 
 		// Skip volumes for which we already have something mounted on that
 		// destination because of a --volume-from.