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
b132c827ce
commit
15fcec3ecd
@ -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