From d14a7565a88edd7f21a8b48ae9208d52d12a29a2 Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Fri, 21 Jul 2017 12:43:12 -0700 Subject: [PATCH] Simplify the error checking in parseKeyAction --- right/src/config/parse_keymap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/right/src/config/parse_keymap.c b/right/src/config/parse_keymap.c index 64b3f14..27e3bb3 100644 --- a/right/src/config/parse_keymap.c +++ b/right/src/config/parse_keymap.c @@ -134,10 +134,8 @@ static parser_error_t parseKeyAction(key_action_t *keyAction, config_buffer_t *b return parseMouseAction(keyAction, buffer); case SerializedKeyActionType_PlayMacro: return parsePlayMacroAction(keyAction, buffer); - default: - return ParserError_InvalidSerializedKeyActionType; } - return ParserError_Success; + return ParserError_InvalidSerializedKeyActionType; } static parser_error_t parseKeyActions(uint8_t targetLayer, config_buffer_t *buffer, uint8_t moduleId, uint8_t pointerRole) {