Use the more portable NZERO instead of PRIO_*

We assume the valid range is [-NZERO, NZERO-1].
This commit is contained in:
sin
2014-02-27 14:19:36 +00:00
parent 2773bdaac7
commit 795ffe490d
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ renice(int which, int who, long adj)
return false;
}
adj = MAX(PRIO_MIN, MIN(adj, PRIO_MAX));
adj = MAX(-NZERO, MIN(adj, NZERO - 1));
if(setpriority(which, who, (int)adj) == -1) {
fprintf(stderr, "can't set %d nice level: %s\n",
who, strerror(errno));