From 52229286502216d836b1f2d933e2ddc2a19e9c8f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 13 Feb 2022 15:45:12 +0900 Subject: [PATCH] libct/specconv: use a local variable in CreateCgroupConfig() Use r instead of spec.Linux.Resources to be consistent throughout this code hunk. Signed-off-by: Masahiro Yamada --- libcontainer/specconv/spec_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/specconv/spec_linux.go b/libcontainer/specconv/spec_linux.go index fad7b802e..5ae95c6c1 100644 --- a/libcontainer/specconv/spec_linux.go +++ b/libcontainer/specconv/spec_linux.go @@ -673,7 +673,7 @@ func CreateCgroupConfig(opts *CreateOpts, defaultDevs []*devices.Device) (*confi if spec.Linux != nil { r := spec.Linux.Resources if r != nil { - for i, d := range spec.Linux.Resources.Devices { + for i, d := range r.Devices { var ( t = "a" major = int64(-1)