Forráskód Böngészése

Cleanup Daemon.verifyVolumesInfo() a bit

vols.VolumesRW has been initialized so it can't be nil. Furthermore
it's ok to read a nil map.

Signed-off-by: Zefan Li <lizefan@huawei.com>
Zefan Li 10 éve
szülő
commit
8b4c0decfc
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      daemon/volumes.go

+ 1 - 1
daemon/volumes.go

@@ -268,7 +268,7 @@ func (daemon *Daemon) verifyVolumesInfo(container *Container) error {
 
 	for destination, hostPath := range vols.Volumes {
 		vfsPath := filepath.Join(daemon.root, "vfs", "dir")
-		rw := vols.VolumesRW != nil && vols.VolumesRW[destination]
+		rw := vols.VolumesRW[destination]
 
 		if strings.HasPrefix(hostPath, vfsPath) {
 			id := filepath.Base(hostPath)