]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Update schedutils/chrt.c
author1frn10 <frn1furkan10@gmail.com>
Thu, 14 May 2026 18:36:19 +0000 (21:36 +0300)
committerGitHub <noreply@github.com>
Thu, 14 May 2026 18:36:19 +0000 (21:36 +0300)
Co-authored-by: Christian Goeschel Ndjomouo <162830835+cgoesche@users.noreply.github.com>
schedutils/chrt.c

index 8b4881bb2f6c41555ef6054e74284fb14271f451..69de3c0f9fbbc24a150dc05b4024c71d21d92348 100644 (file)
@@ -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':