summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-02-18 10:38:49 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-02-18 10:38:49 -0300
commit8c653212c0e6d15997e4217a514301f5682a41c4 (patch)
tree53c72812eebbb69c212183cb77db8051731f63c2 /linux
parentb064d501ae68a20f519064662205905dbe9f9b85 (diff)
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
Diffstat (limited to 'linux')
-rw-r--r--linux/Platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/Platform.c b/linux/Platform.c
index 025abff6..ab90ca74 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -96,7 +96,7 @@ static Htop_Reaction Platform_actionSetIOPriority(State* st) {
void* set = Action_pickFromVector(st, ioprioPanel, 21);
if (set) {
IOPriority ioprio = IOPriorityPanel_getIOPriority(ioprioPanel);
- bool ok = MainPanel_foreachProcess((MainPanel*)panel, (MainPanel_ForeachProcessFn) LinuxProcess_setIOPriority, (size_t) ioprio, NULL);
+ bool ok = MainPanel_foreachProcess((MainPanel*)panel, (MainPanel_ForeachProcessFn) LinuxProcess_setIOPriority, (Arg){ .i = ioprio }, NULL);
if (!ok)
beep();
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy