Code

screen_keydef: clean up keydef_cmd return values
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 24 Dec 2011 17:28:05 +0000 (18:28 +0100)
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 24 Dec 2011 17:28:05 +0000 (18:28 +0100)
src/screen_keydef.c

index cd340f8126f5f44f32dae1abb648dbb827e00bfe..6ed3e332c53162571e42959fb11f361b8e1bce19 100644 (file)
@@ -346,16 +346,15 @@ keydef_cmd(G_GNUC_UNUSED struct mpdclient *c, command_t cmd)
 
                        keydef_repaint();
                }
-               break;
+               return true;
        case CMD_DELETE:
                if (subcmd >= 0 && lw->selected >= STATIC_SUB_ITEMS)
                        delete_key(subcmd, lw->selected - STATIC_SUB_ITEMS);
                return true;
-               break;
        case CMD_SAVE_PLAYLIST:
                apply_keys();
                save_keys();
-               break;
+               return true;
        case CMD_LIST_FIND:
        case CMD_LIST_RFIND:
        case CMD_LIST_FIND_NEXT:
@@ -365,9 +364,11 @@ keydef_cmd(G_GNUC_UNUSED struct mpdclient *c, command_t cmd)
                return true;
 
        default:
-               break;
+               return false;
        }
 
+       /* unreachable */
+       assert(0);
        return false;
 }