mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-10 17:47:52 +00:00
Cherry picked from commit 2e8bce201e with
additional updates required for the v4.2.0-rhel branch.
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
Assisted by AI: Cursor <Auto>
Signed-off-by: Chris Evich <cevich@redhat.com>
10 lines
250 B
Go
10 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
|
|
}
|