@@ -317,8 +317,10 @@ static int raise_soft_prio(int policy, const struct sched_param *param)
return err;
}
- soft_max = (rlim.rlim_cur == RLIM_INFINITY) ? policy_max : rlim.rlim_cur;
- hard_max = (rlim.rlim_max == RLIM_INFINITY) ? policy_max : rlim.rlim_max;
+ soft_max = (rlim.rlim_cur == RLIM_INFINITY) ? (unsigned int)policy_max
+ : rlim.rlim_cur;
+ hard_max = (rlim.rlim_max == RLIM_INFINITY) ? (unsigned int)policy_max
+ : rlim.rlim_max;
if (prio > soft_max && prio <= hard_max) {
rlim.rlim_cur = prio;