mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
Also update to c/image after https://github.com/containers/image/pull/1821 , so that we don't ship two versions of the package simultaneously. [NO NEW TESTS NEEDED] Signed-off-by: Miloslav Trmač <mitr@redhat.com>
11 lines
250 B
Go
11 lines
250 B
Go
package internal
|
|
|
|
// CheckRequestedWidth checks that requested width doesn't overflow
|
|
// available width
|
|
func CheckRequestedWidth(requested, available int) int {
|
|
if requested < 1 || requested >= available {
|
|
return available
|
|
}
|
|
return requested
|
|
}
|