summaryrefslogtreecommitdiffstats
path: root/linux/IOPriorityPanel.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-11-01 01:09:51 +0100
committerBenny Baumann <BenBE@geshi.org>2020-11-02 22:15:01 +0100
commit45869513bfebba80cc2ab42e4218f68b34b1e6ac (patch)
treef064631dbff141bf1c945db8cff40b7bb82fd169 /linux/IOPriorityPanel.c
parent61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff)
Embracing branches
Diffstat (limited to 'linux/IOPriorityPanel.c')
-rw-r--r--linux/IOPriorityPanel.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/linux/IOPriorityPanel.c b/linux/IOPriorityPanel.c
index 9f85e792..cd4b2e60 100644
--- a/linux/IOPriorityPanel.c
+++ b/linux/IOPriorityPanel.c
@@ -21,7 +21,11 @@ Panel* IOPriorityPanel_new(IOPriority currPrio) {
Panel_setHeader(this, "IO Priority:");
Panel_add(this, (Object*) ListItem_new("None (based on nice)", IOPriority_None));
- if (currPrio == IOPriority_None) Panel_setSelected(this, 0);
+
+ if (currPrio == IOPriority_None) {
+ Panel_setSelected(this, 0);
+ }
+
static const struct { int klass; const char* name; } classes[] = {
{ .klass = IOPRIO_CLASS_RT, .name = "Realtime" },
{ .klass = IOPRIO_CLASS_BE, .name = "Best-effort" },
@@ -33,11 +37,15 @@ Panel* IOPriorityPanel_new(IOPriority currPrio) {
xSnprintf(name, sizeof(name) - 1, "%s %d %s", classes[c].name, i, i == 0 ? "(High)" : (i == 7 ? "(Low)" : ""));
IOPriority ioprio = IOPriority_tuple(classes[c].klass, i);
Panel_add(this, (Object*) ListItem_new(name, ioprio));
- if (currPrio == ioprio) Panel_setSelected(this, Panel_size(this) - 1);
+ if (currPrio == ioprio) {
+ Panel_setSelected(this, Panel_size(this) - 1);
+ }
}
}
Panel_add(this, (Object*) ListItem_new("Idle", IOPriority_Idle));
- if (currPrio == IOPriority_Idle) Panel_setSelected(this, Panel_size(this) - 1);
+ if (currPrio == IOPriority_Idle) {
+ Panel_setSelected(this, Panel_size(this) - 1);
+ }
return this;
}

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