Skip to content

Commit 1f80c54

Browse files
authored
Merge pull request #5339 from thaJeztah/27.x_backport_fix_bps_limit
[27.x backport] run: fix GetList return empty issue for throttledevice
2 parents 33573e2 + 946d109 commit 1f80c54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opts/throttledevice.go

+1-1
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)