mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Avoid some unnecessary casts and mark some not changing variables const
This commit is contained in:

committed by
cgzones

parent
27870bd4de
commit
ac2b07eddd
@ -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
|
||||
|
Reference in New Issue
Block a user