Skip to content

Commit

Permalink
opts/throttledevice.go:51:5: SA4003: unsigned values are never < 0 (s…
Browse files Browse the repository at this point in the history
…taticcheck)

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
silvin-lubecki authored and thaJeztah committed Oct 31, 2019
1 parent ab255f1 commit 2962971
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions opts/throttledevice.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ func ValidateThrottleIOpsDevice(val string) (*blkiodev.ThrottleDevice, error) {
if err != nil {
return nil, fmt.Errorf("invalid rate for device: %s. The correct format is <device-path>:<number>. Number must be a positive integer", val)
}
if rate < 0 {
return nil, fmt.Errorf("invalid rate for device: %s. The correct format is <device-path>:<number>. Number must be a positive integer", val)
}

return &blkiodev.ThrottleDevice{Path: split[0], Rate: rate}, nil
}
Expand Down

0 comments on commit 2962971

Please sign in to comment.