mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Replace size_t with int/void* union
I was occasionally passing negative values to size_t. Plus, this better reflects the intent of the variant argument. Reported by Coverity: https://scan8.coverity.com/reports.htm#v13253/p10402/fileInstanceId=22093891&defectInstanceId=7543346&mergedDefectId=174179&fileStart=251&fileEnd=500
This commit is contained in:
@ -536,11 +536,11 @@ bool Process_setPriority(Process* this, int priority) {
|
||||
return (err == 0);
|
||||
}
|
||||
|
||||
bool Process_changePriorityBy(Process* this, size_t delta) {
|
||||
bool Process_changePriorityBy(Process* this, int delta) {
|
||||
return Process_setPriority(this, this->nice + delta);
|
||||
}
|
||||
|
||||
void Process_sendSignal(Process* this, size_t sgn) {
|
||||
void Process_sendSignal(Process* this, int sgn) {
|
||||
CRT_dropPrivileges();
|
||||
kill(this->pid, (int) sgn);
|
||||
CRT_restorePrivileges();
|
||||
|
Reference in New Issue
Block a user