diff --git a/scenes/add_new_token/totp_scene_add_new_token.c b/scenes/add_new_token/totp_scene_add_new_token.c index 090cfa808f6..97b642f5c27 100644 --- a/scenes/add_new_token/totp_scene_add_new_token.c +++ b/scenes/add_new_token/totp_scene_add_new_token.c @@ -282,7 +282,8 @@ bool totp_scene_add_new_token_handle_event(PluginEvent* const event, PluginState } break; } - default: break; + default: + break; } break; case InputKeyBack: @@ -295,7 +296,8 @@ bool totp_scene_add_new_token_handle_event(PluginEvent* const event, PluginState totp_scene_director_activate_scene(plugin_state, TotpSceneGenerateToken, NULL); } break; - default: break; + default: + break; } return true; diff --git a/scenes/app_settings/totp_app_settings.c b/scenes/app_settings/totp_app_settings.c index 1e74a351cea..63db2e46bf5 100644 --- a/scenes/app_settings/totp_app_settings.c +++ b/scenes/app_settings/totp_app_settings.c @@ -163,7 +163,8 @@ bool totp_scene_app_settings_handle_event( } break; } - default: break; + default: + break; } return true; diff --git a/scenes/authenticate/totp_scene_authenticate.c b/scenes/authenticate/totp_scene_authenticate.c index 4ceacd033ca..627f6a10d12 100644 --- a/scenes/authenticate/totp_scene_authenticate.c +++ b/scenes/authenticate/totp_scene_authenticate.c @@ -152,7 +152,8 @@ bool totp_scene_authenticate_handle_event( scene_state->code_length--; } break; - default: break; + default: + break; } return true; diff --git a/scenes/generate_token/totp_scene_generate_token.c b/scenes/generate_token/totp_scene_generate_token.c index 7582a166ea2..f0366243a3f 100644 --- a/scenes/generate_token/totp_scene_generate_token.c +++ b/scenes/generate_token/totp_scene_generate_token.c @@ -73,7 +73,8 @@ TOTP_ALGO get_totp_algo_impl(TokenHashAlgo algo) { return TOTP_ALGO_SHA256; case SHA512: return TOTP_ALGO_SHA512; - default: break; + default: + break; } return NULL; @@ -300,7 +301,8 @@ bool totp_scene_generate_token_handle_event( break; case InputKeyBack: break; - default: break; + default: + break; } return true; diff --git a/scenes/scene_director.c b/scenes/scene_director.c index 88e9cd96a4f..a518dcfc893 100644 --- a/scenes/scene_director.c +++ b/scenes/scene_director.c @@ -30,7 +30,8 @@ void totp_scene_director_activate_scene( break; case TotpSceneNone: break; - default: break; + default: + break; } plugin_state->current_scene = scene; @@ -56,7 +57,8 @@ void totp_scene_director_deactivate_active_scene(PluginState* const plugin_state break; case TotpSceneNone: break; - default: break; + default: + break; } } @@ -87,7 +89,8 @@ void totp_scene_director_render(Canvas* const canvas, PluginState* const plugin_ break; case TotpSceneNone: break; - default: break; + default: + break; } } @@ -119,7 +122,8 @@ bool totp_scene_director_handle_event(PluginEvent* const event, PluginState* con break; case TotpSceneNone: break; - default: break; + default: + break; } return processing; diff --git a/scenes/token_menu/totp_scene_token_menu.c b/scenes/token_menu/totp_scene_token_menu.c index 58657006d4f..d936bf95fdd 100644 --- a/scenes/token_menu/totp_scene_token_menu.c +++ b/scenes/token_menu/totp_scene_token_menu.c @@ -171,7 +171,8 @@ bool totp_scene_token_menu_handle_event(const PluginEvent* const event, PluginSt } break; } - default: break; + default: + break; } break; case InputKeyBack: { @@ -185,7 +186,8 @@ bool totp_scene_token_menu_handle_event(const PluginEvent* const event, PluginSt } break; } - default: break; + default: + break; } return true; diff --git a/services/cli/commands/add/add.c b/services/cli/commands/add/add.c index 86ec667cf56..2e8f225474e 100644 --- a/services/cli/commands/add/add.c +++ b/services/cli/commands/add/add.c @@ -22,7 +22,8 @@ static bool token_info_set_digits_from_str(TokenInfo* token_info, const FuriStri case '8': token_info->digits = TOTP_8_DIGITS; return true; - default: break; + default: + break; } return false; diff --git a/services/cli/commands/list/list.c b/services/cli/commands/list/list.c index 7f85b568abc..9f6bf2d0f3e 100644 --- a/services/cli/commands/list/list.c +++ b/services/cli/commands/list/list.c @@ -13,7 +13,8 @@ static char* get_algo_as_cstr(TokenHashAlgo algo) { return TOTP_CONFIG_TOKEN_ALGO_SHA256_NAME; case SHA512: return TOTP_CONFIG_TOKEN_ALGO_SHA512_NAME; - default: break; + default: + break; } return "UNKNOWN"; @@ -25,7 +26,8 @@ static uint8_t get_digits_as_int(TokenDigitsCount digits) { return 6; case TOTP_8_DIGITS: return 8; - default: break; + default: + break; } return 6; diff --git a/services/config/config.c b/services/config/config.c index fa2fb9d5934..765b9c20ed5 100644 --- a/services/config/config.c +++ b/services/config/config.c @@ -16,7 +16,8 @@ static uint8_t token_info_get_digits_as_int(const TokenInfo* token_info) { return 6; case TOTP_8_DIGITS: return 8; - default: break; + default: + break; } return 6; @@ -30,7 +31,8 @@ static void token_info_set_digits_from_int(TokenInfo* token_info, uint8_t digits case 8: token_info->digits = TOTP_8_DIGITS; break; - default: break; + default: + break; } } @@ -42,7 +44,8 @@ static char* token_info_get_algo_as_cstr(const TokenInfo* token_info) { return TOTP_CONFIG_TOKEN_ALGO_SHA256_NAME; case SHA512: return TOTP_CONFIG_TOKEN_ALGO_SHA512_NAME; - default: break; + default: + break; } return NULL; diff --git a/services/hmac/sha1.c b/services/hmac/sha1.c index 51bfec38afe..243a6dde82a 100644 --- a/services/hmac/sha1.c +++ b/services/hmac/sha1.c @@ -227,24 +227,24 @@ void sha1_process_block(const void* buffer, size_t len, struct sha1_ctx* ctx) { words++; } - for (int i = 0; i < 80; i++) { + for(int i = 0; i < 80; i++) { uint32_t xx = i < 16 ? x[i] : M(i); uint32_t ki = i / 20; - switch (ki) { - case 0: + switch(ki) { + case 0: R(a, b, c, d, e, F1, K1, xx); break; - case 1: + case 1: R(a, b, c, d, e, F2, K2, xx); break; - case 2: + case 2: R(a, b, c, d, e, F3, K3, xx); break; - default: + default: R(a, b, c, d, e, F4, K4, xx); break; } - + uint32_t tt = a; a = e; e = d; diff --git a/services/hmac/sha256.c b/services/hmac/sha256.c index bf24e01e86d..89ca67c2bec 100644 --- a/services/hmac/sha256.c +++ b/services/hmac/sha256.c @@ -253,7 +253,7 @@ void sha256_process_block(const void* buffer, size_t len, struct sha256_ctx* ctx words++; } - for (int i = 0; i < 64; i++) { + for(int i = 0; i < 64; i++) { uint32_t xx = i < 16 ? x[i] : M(i); R(a, b, c, d, e, f, g, h, K(i), xx); uint32_t tt = a; diff --git a/services/hmac/sha512.c b/services/hmac/sha512.c index 6daa9ea8968..f04c4d593b4 100644 --- a/services/hmac/sha512.c +++ b/services/hmac/sha512.c @@ -282,7 +282,7 @@ void sha512_process_block(const void* buffer, size_t len, struct sha512_ctx* ctx words++; } - for (int i = 0; i < 80; i++) { + for(int i = 0; i < 80; i++) { u64 xx = i < 16 ? x[i] : M(i); R(a, b, c, d, e, f, g, h, K(i), xx); u64 tt = a; diff --git a/services/list/list.c b/services/list/list.c index 71560ff9eb0..bc7307fdbaf 100644 --- a/services/list/list.c +++ b/services/list/list.c @@ -2,7 +2,7 @@ ListNode* list_init_head(void* data) { ListNode* new = malloc(sizeof(ListNode)); - if (new == NULL) return NULL; + if(new == NULL) return NULL; new->data = data; new->next = NULL; return new; @@ -10,7 +10,7 @@ ListNode* list_init_head(void* data) { ListNode* list_add(ListNode* head, void* data) { ListNode* new = malloc(sizeof(ListNode)); - if (new == NULL) return NULL; + if(new == NULL) return NULL; new->data = data; new->next = NULL; diff --git a/services/totp/totp.c b/services/totp/totp.c index 71b68480bf3..9e0672ea95b 100644 --- a/services/totp/totp.c +++ b/services/totp/totp.c @@ -45,7 +45,7 @@ uint32_t otp_generate( size_t plain_secret_length, uint64_t input) { uint8_t* hmac = malloc(64); - if (hmac == NULL) return OTP_ERROR; + if(hmac == NULL) return OTP_ERROR; memset(hmac, 0, 64); uint64_t input_swapped = swap_uint64(input); diff --git a/types/token_info.c b/types/token_info.c index dabd5e13e97..66e32f5a41c 100644 --- a/types/token_info.c +++ b/types/token_info.c @@ -51,7 +51,8 @@ uint8_t token_info_get_digits_count(const TokenInfo* token_info) { return 6; case TOTP_8_DIGITS: return 8; - default: break; + default: + break; } return 6;