diff options
| author | Han Xinrong <[email protected]> | 2020-12-15 11:37:23 +0800 |
|---|---|---|
| committer | Han Xinrong <[email protected]> | 2020-12-15 11:37:23 +0800 |
| commit | db4b3ff125871427e78cd7105b28f68a3e7c646c (patch) | |
| tree | e6c6d330104e3e5c6ec97a7e1ac73def4700d646 /components/dfs | |
| parent | a1fe7b1ddf882ab37eb61157fffcf2e42c7b2357 (diff) | |
modify code style
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/filesystems/jffs2/src/gcthread.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/components/dfs/filesystems/jffs2/src/gcthread.c b/components/dfs/filesystems/jffs2/src/gcthread.c index 0aad0ae3ae..ab66e1878e 100644 --- a/components/dfs/filesystems/jffs2/src/gcthread.c +++ b/components/dfs/filesystems/jffs2/src/gcthread.c @@ -187,7 +187,7 @@ jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c) { struct super_block *sb=OFNI_BS_2SFFJ(c); cyg_mtab_entry *mte; - rt_uint32_t e; + rt_uint32_t e; rt_err_t result; //RT_ASSERT(sb->s_gc_thread_handle); @@ -203,13 +203,16 @@ jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c) GC_THREAD_FLAG_HAS_EXIT, RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR, RT_WAITING_FOREVER, &e); - if (result == -RT_ETIMEOUT) { - LOG_E("wait completed timeout"); - return; - }else if (result == -RT_ERROR) { - LOG_E("event received error"); - return; - } + if (result == -RT_ETIMEOUT) + { + LOG_E("wait completed timeout"); + return; + } + else if (result == -RT_ERROR) + { + LOG_E("event received error"); + return; + } // Kill and free the resources ... this is safe due to the flag // from the thread. @@ -236,10 +239,13 @@ jffs2_garbage_collect_thread(unsigned long data) RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR, cyg_current_time() + CYGNUM_JFFS2_GS_THREAD_TICKS, &flag); - if (result == -RT_ETIMEOUT) { + if (result == -RT_ETIMEOUT) + { LOG_E("wait completed timeout"); continue; - }else if (result == -RT_ERROR) { + } + else if (result == -RT_ERROR) + { LOG_E("event received error"); continue; } |
