浏览代码

oci/deviceCgroup(): remove redundant variable

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 5 年之前
父节点
当前提交
bd0c2b3581
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      oci/devices_linux.go

+ 1 - 2
oci/devices_linux.go

@@ -25,10 +25,9 @@ func Device(d *configs.Device) specs.LinuxDevice {
 }
 
 func deviceCgroup(d *configs.Device) specs.LinuxDeviceCgroup {
-	t := string(d.Type)
 	return specs.LinuxDeviceCgroup{
 		Allow:  true,
-		Type:   t,
+		Type:   string(d.Type),
 		Major:  &d.Major,
 		Minor:  &d.Minor,
 		Access: d.Permissions,