Avoid some unnecessary casts and mark some not changing variables const

This commit is contained in:
Christian Göttsche
2020-10-27 11:46:29 +01:00
committed by cgzones
parent 27870bd4de
commit ac2b07eddd
7 changed files with 16 additions and 17 deletions

View File

@ -179,12 +179,12 @@ IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this) {
return ioprio;
}
bool LinuxProcess_setIOPriority(LinuxProcess* this, Arg ioprio) {
bool LinuxProcess_setIOPriority(Process* this, Arg ioprio) {
// Other OSes masquerading as Linux (NetBSD?) don't have this syscall
#ifdef SYS_ioprio_set
syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, this->super.pid, ioprio.i);
syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, this->pid, ioprio.i);
#endif
return (LinuxProcess_updateIOPriority(this) == ioprio.i);
return (LinuxProcess_updateIOPriority((LinuxProcess*)this) == ioprio.i);
}
#ifdef HAVE_DELAYACCT