Skip to content

Commit 6dfa0ff

Browse files
committed
Fixed astyle failures on handle_error().
1 parent de3d288 commit 6dfa0ff

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

platform/source/mbed_error.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,18 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
154154
current_error_ctx.error_status = error_status;
155155
current_error_ctx.error_value = error_value;
156156
if (error_status == MBED_ERROR_MEMMANAGE_EXCEPTION ||
157-
error_status == MBED_ERROR_BUSFAULT_EXCEPTION ||
158-
error_status == MBED_ERROR_USAGEFAULT_EXCEPTION ||
159-
error_status == MBED_ERROR_HARDFAULT_EXCEPTION)
160-
{
157+
error_status == MBED_ERROR_BUSFAULT_EXCEPTION ||
158+
error_status == MBED_ERROR_USAGEFAULT_EXCEPTION ||
159+
error_status == MBED_ERROR_HARDFAULT_EXCEPTION) {
161160
#if defined(__CORTEX_M)
162-
mbed_fault_context_t *mfc = (mbed_fault_context_t*)error_value;
161+
mbed_fault_context_t *mfc = (mbed_fault_context_t *)error_value;
163162
current_error_ctx.error_address = (uint32_t)mfc->PC_reg;
164163
current_error_ctx.thread_current_sp = (uint32_t)mfc->SP_reg;
165164
// Note that the RTX thread itself is same even under fault exception handlers.
166165
#else
167166
#warning Please implement non Cortex-M handler for those error cases.
168167
#endif
169-
}
170-
else
171-
{
168+
} else {
172169
current_error_ctx.error_address = (uint32_t)caller;
173170
current_error_ctx.thread_current_sp = (uint32_t)&current_error_ctx; // Address local variable to get a stack pointer
174171
}

0 commit comments

Comments
 (0)