diff options
Diffstat (limited to 'usr.bin/renice/renice.c')
-rw-r--r-- | usr.bin/renice/renice.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index cda69fd1ad3f..c3864c9c5401 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -104,17 +104,22 @@ main(int argc, char *argv[]) if (which == PRIO_USER) { if ((pwd = getpwnam(*argv)) != NULL) who = pwd->pw_uid; - else if (getnum("uid", *argv, &who)) + else if (getnum("uid", *argv, &who)) { + errs++; continue; - else if (who < 0) { + } else if (who < 0) { warnx("%s: bad value", *argv); + errs++; continue; } } else { - if (getnum("pid", *argv, &who)) + if (getnum("pid", *argv, &who)) { + errs++; continue; + } if (who < 0) { warnx("%s: bad value", *argv); + errs++; continue; } } |