When not specifying a PID with --pid, `chrt` would report:
chrt: invalid PID argument: '--pid'
That was silly. After this change, `chrt --pid` will report:
chrt: too few arguments
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
policy_given = true;
break;
case 'p':
+ if (argc - optind == 0)
+ errx(EXIT_FAILURE, _("too few arguments"));
errno = 0;
/* strtopid_or_err() is not suitable here; 0 can be passed.*/
ctl->pid = strtos32_or_err(argv[argc - 1], _("invalid PID argument"));