Browse code

daemon: openContainerFS: rename output var

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2024/07/26 20:39:07
Showing 1 changed files
... ...
@@ -53,14 +53,14 @@ type containerFSView struct {
53 53
 }
54 54
 
55 55
 // openContainerFS opens a new view of the container's filesystem.
56
-func (daemon *Daemon) openContainerFS(ctr *container.Container) (_ *containerFSView, err error) {
56
+func (daemon *Daemon) openContainerFS(ctr *container.Container) (_ *containerFSView, retErr error) {
57 57
 	ctx := context.TODO()
58 58
 
59 59
 	if err := daemon.Mount(ctr); err != nil {
60 60
 		return nil, err
61 61
 	}
62 62
 	defer func() {
63
-		if err != nil {
63
+		if retErr != nil {
64 64
 			_ = daemon.Unmount(ctr)
65 65
 		}
66 66
 	}()
... ...
@@ -72,7 +72,7 @@ func (daemon *Daemon) openContainerFS(ctr *container.Container) (_ *containerFSV
72 72
 	defer func() {
73 73
 		ctx := context.WithoutCancel(ctx)
74 74
 		cleanup(ctx)
75
-		if err != nil {
75
+		if retErr != nil {
76 76
 			_ = ctr.UnmountVolumes(ctx, daemon.LogVolumeEvent)
77 77
 		}
78 78
 	}()