game/gui: Merge menu_action() if statements
@@ -139,8 +139,7 @@ static int menu_action(component *mc, int action) {
// Handle down/up selection movement
c = sizer_get(mc, m->selected);
- if(c != NULL) {
- if(action == ACT_DOWN || action == ACT_UP) {
+ if(c != NULL && (action == ACT_DOWN || action == ACT_UP)) {
component_select(c, 0);
do {
if(action == ACT_DOWN) {
@@ -164,7 +163,6 @@ static int menu_action(component *mc, int action) {
component_select(c, 1);
return 0;
}
- }
// If the key wasn't handled yet and we have a valid component,
// pass on the event
