o Fix an arguments number check in -n case.
o Remove duplicated prio check, donice() makes it for us. Spotted by: David Schultz <dschultz@uclink.Berkeley.EDU> MFC after: 1 week
This commit is contained in:
parent
380ee390fd
commit
8143906680
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94360
@ -82,17 +82,12 @@ main(int argc, char *argv[])
|
||||
if (strcmp(*argv, "-n") == 0) {
|
||||
incr = 1;
|
||||
argc--, argv++;
|
||||
if (argc == 0)
|
||||
if (argc < 2)
|
||||
usage();
|
||||
}
|
||||
if (getnum("priority", *argv, &prio))
|
||||
return (1);
|
||||
prio = atoi(*argv);
|
||||
argc--, argv++;
|
||||
if (prio > PRIO_MAX)
|
||||
prio = PRIO_MAX;
|
||||
if (prio < PRIO_MIN)
|
||||
prio = PRIO_MIN;
|
||||
for (; argc > 0; argc--, argv++) {
|
||||
if (strcmp(*argv, "-g") == 0) {
|
||||
which = PRIO_PGRP;
|
||||
|
Loading…
Reference in New Issue
Block a user