summaryrefslogtreecommitdiffstats
path: root/AffinityPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2011-11-05 04:42:15 +0000
committerHisham Muhammad <hisham@gobolinux.org>2011-11-05 04:42:15 +0000
commit539b32dc3134f4753a0e1a265f1ca1e2a77696c3 (patch)
treeebbd506268e510bb8b45ff8dfe323991c8eef9e5 /AffinityPanel.c
parent9f29e92777d6da4350306e682340aa815b60c892 (diff)
simplify code
Diffstat (limited to 'AffinityPanel.c')
-rw-r--r--AffinityPanel.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/AffinityPanel.c b/AffinityPanel.c
index 504638e7..404104a1 100644
--- a/AffinityPanel.c
+++ b/AffinityPanel.c
@@ -8,21 +8,18 @@
#include <assert.h>
static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) {
- HandlerResult result = IGNORED;
CheckItem* selected = (CheckItem*) Panel_getSelected(this);
switch(ch) {
case KEY_MOUSE:
case ' ':
CheckItem_set(selected, ! (CheckItem_get(selected)) );
- result = HANDLED;
- break;
+ return HANDLED;
case 0x0a:
case 0x0d:
case KEY_ENTER:
- result = BREAK_LOOP;
- break;
+ return BREAK_LOOP;
}
- return result;
+ return IGNORED;
}
Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity) {

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