Simplify Action_pickFromVector() width parameter usage

Pass one less instead of subtracting one inside the function.
This commit is contained in:
Christian Göttsche
2021-08-10 01:06:22 +02:00
committed by BenBE
parent 68460b25e3
commit edafa26f9e
2 changed files with 5 additions and 6 deletions

View File

@ -138,7 +138,7 @@ static Htop_Reaction Platform_actionSetIOPriority(State* st) {
IOPriority ioprio1 = p->ioPriority;
Panel* ioprioPanel = IOPriorityPanel_new(ioprio1);
const void* set = Action_pickFromVector(st, ioprioPanel, 21, true);
const void* set = Action_pickFromVector(st, ioprioPanel, 20, true);
if (set) {
IOPriority ioprio2 = IOPriorityPanel_getIOPriority(ioprioPanel);
bool ok = MainPanel_foreachProcess(st->mainPanel, LinuxProcess_setIOPriority, (Arg) { .i = ioprio2 }, NULL);