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>
This commit is contained in:
Zefan Li 2015-06-02 23:08:41 +08:00
parent 25376c652d
commit 8b4c0decfc
1 changed files with 1 additions and 1 deletions

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)