From: 1frn10 Date: Thu, 14 May 2026 18:36:19 +0000 (+0300) Subject: Update schedutils/chrt.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87a09f474a532675b6f0c3659af2b4ae740ff822;p=thirdparty%2Futil-linux.git Update schedutils/chrt.c Co-authored-by: Christian Goeschel Ndjomouo <162830835+cgoesche@users.noreply.github.com> --- diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 8b4881bb2..69de3c0f9 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -526,9 +526,7 @@ int main(int argc, char **argv) case 'X': #ifdef SCHED_FLAG_UTIL_CLAMP_MAX ctl->sched_flags |= SCHED_FLAG_UTIL_CLAMP_MAX; - ctl->util_max = strtou32_or_err(optarg, _("invalid --clamp-max value")); - if (ctl->util_max > 1024) - errx(EXIT_FAILURE, _("--clamp-max value must be in range 0-1024")); + ctl->util_max = (uint32_t) str2unum_or_err(optarg, 10, _("--clamp-max value must be in range 0-1024"), 1024); #endif break; case 'i':