Skip to content

Commit 471862b

Browse files
authored
Merge pull request #5323 from jongwu/fix_bps_limit
run: fix GetList return empty issue for throttledevice
2 parents fc3e949 + 73e78a5 commit 471862b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opts/throttledevice.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (opt *ThrottledeviceOpt) String() string {
9494

9595
// GetList returns a slice of pointers to ThrottleDevices.
9696
func (opt *ThrottledeviceOpt) GetList() []*blkiodev.ThrottleDevice {
97-
out := make([]*blkiodev.ThrottleDevice, 0, len(opt.values))
97+
out := make([]*blkiodev.ThrottleDevice, len(opt.values))
9898
copy(out, opt.values)
9999
return out
100100
}

0 commit comments

Comments
 (0)