Skip to content

Commit db4b3ff

Browse files
author
Han Xinrong
committed
modify code style
1 parent a1fe7b1 commit db4b3ff

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

bsp/nrf5x/libraries/templates/nrf52x/applications/ble_nus_app.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,10 +603,13 @@ static void _stack_thread(void *parameter)
603603

604604
result = rt_event_recv(stack_event, STACK_EV_DISCON | STACK_EV_DISPATCH | STACK_EV_KEY,
605605
RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR, next_timeout, &event);
606-
if (result == -RT_ETIMEOUT) {
606+
if (result == -RT_ETIMEOUT)
607+
{
607608
LOG_E("wait completed timeout");
608609
continue;
609-
}else if (result == -RT_ERROR) {
610+
}
611+
else if (result == -RT_ERROR)
612+
{
610613
LOG_E("event received error");
611614
continue;
612615
}

components/dfs/filesystems/jffs2/src/gcthread.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c)
187187
{
188188
struct super_block *sb=OFNI_BS_2SFFJ(c);
189189
cyg_mtab_entry *mte;
190-
rt_uint32_t e;
190+
rt_uint32_t e;
191191
rt_err_t result;
192192

193193
//RT_ASSERT(sb->s_gc_thread_handle);
@@ -203,13 +203,16 @@ jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c)
203203
GC_THREAD_FLAG_HAS_EXIT,
204204
RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR,
205205
RT_WAITING_FOREVER, &e);
206-
if (result == -RT_ETIMEOUT) {
207-
LOG_E("wait completed timeout");
208-
return;
209-
}else if (result == -RT_ERROR) {
210-
LOG_E("event received error");
211-
return;
212-
}
206+
if (result == -RT_ETIMEOUT)
207+
{
208+
LOG_E("wait completed timeout");
209+
return;
210+
}
211+
else if (result == -RT_ERROR)
212+
{
213+
LOG_E("event received error");
214+
return;
215+
}
213216

214217
// Kill and free the resources ... this is safe due to the flag
215218
// from the thread.
@@ -236,10 +239,13 @@ jffs2_garbage_collect_thread(unsigned long data)
236239
RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR,
237240
cyg_current_time() + CYGNUM_JFFS2_GS_THREAD_TICKS,
238241
&flag);
239-
if (result == -RT_ETIMEOUT) {
242+
if (result == -RT_ETIMEOUT)
243+
{
240244
LOG_E("wait completed timeout");
241245
continue;
242-
}else if (result == -RT_ERROR) {
246+
}
247+
else if (result == -RT_ERROR)
248+
{
243249
LOG_E("event received error");
244250
continue;
245251
}

0 commit comments

Comments
 (0)