diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-11-05 04:42:15 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-11-05 04:42:15 +0000 |
commit | 539b32dc3134f4753a0e1a265f1ca1e2a77696c3 (patch) | |
tree | ebbd506268e510bb8b45ff8dfe323991c8eef9e5 | |
parent | 9f29e92777d6da4350306e682340aa815b60c892 (diff) |
simplify code
-rw-r--r-- | AffinityPanel.c | 9 |
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) { |