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>
Upstream-commit: 8b4c0decfc6a3ef748a70c2f53d1351d5aa8ab64
Component: engine
This commit is contained in:
Zefan Li
2015-06-03 09:19:16 +08:00
parent 8eb2968395
commit 3cf411b6db
+1 -1
View File
@@ -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)