From 539b32dc3134f4753a0e1a265f1ca1e2a77696c3 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 5 Nov 2011 04:42:15 +0000 Subject: simplify code --- AffinityPanel.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'AffinityPanel.c') diff --git a/AffinityPanel.c b/AffinityPanel.c index 504638e7..404104a1 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -8,21 +8,18 @@ #include 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) { -- cgit v1.2.3