From 8b4c0decfc6a3ef748a70c2f53d1351d5aa8ab64 Mon Sep 17 00:00:00 2001 From: Zefan Li Date: Tue, 2 Jun 2015 23:08:41 +0800 Subject: [PATCH] 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 --- daemon/volumes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/volumes.go b/daemon/volumes.go index 2346eb715f..0d7e5da8c3 100644 --- a/daemon/volumes.go +++ b/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)