Skip to content

Commit e7816bc

Browse files
committed
astyle to mbed_error.c
1 parent e4be878 commit e7816bc

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

platform/source/mbed_error.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
153153
current_error_ctx.error_status = error_status;
154154
current_error_ctx.error_value = error_value;
155155
bool bHWException = (error_status == MBED_ERROR_MEMMANAGE_EXCEPTION ||
156-
error_status == MBED_ERROR_BUSFAULT_EXCEPTION ||
157-
error_status == MBED_ERROR_USAGEFAULT_EXCEPTION ||
158-
error_status == MBED_ERROR_HARDFAULT_EXCEPTION);
156+
error_status == MBED_ERROR_BUSFAULT_EXCEPTION ||
157+
error_status == MBED_ERROR_USAGEFAULT_EXCEPTION ||
158+
error_status == MBED_ERROR_HARDFAULT_EXCEPTION);
159159
mbed_fault_context_t *mfc = NULL;
160160
if (bHWException) {
161161
mfc = (mbed_fault_context_t *)error_value;
@@ -169,16 +169,13 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
169169
}
170170

171171
#ifdef MBED_CONF_RTOS_PRESENT
172-
if (mfc && !(mfc->EXC_RETURN & 0x4))
173-
{
172+
if (mfc && !(mfc->EXC_RETURN & 0x4)) {
174173
// handler mode
175174
current_error_ctx.thread_id = 0;
176175
current_error_ctx.thread_entry_address = 0;
177176
current_error_ctx.thread_stack_size = MAX(0, INITIAL_SP - current_error_ctx.thread_current_sp - sizeof(int));
178177
current_error_ctx.thread_stack_mem = current_error_ctx.thread_current_sp;
179-
}
180-
else
181-
{
178+
} else {
182179
// Capture thread info in thread mode
183180
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;
184181
current_error_ctx.thread_id = (uint32_t)current_thread;
@@ -470,8 +467,9 @@ mbed_error_status_t mbed_clear_all_errors(void)
470467

471468
static inline const char *name_or_unnamed(const osRtxThread_t *thread)
472469
{
473-
if (!thread)
470+
if (!thread) {
474471
return "<handler>";
472+
}
475473

476474
const char *name = thread->name;
477475
return name ? name : "<unnamed>";

0 commit comments

Comments
 (0)