diff options
| author | armink <[email protected]> | 2018-07-17 12:52:02 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2018-07-17 12:52:02 +0800 |
| commit | 4c92650fde23f16558208bcc73e56362fe67a3cb (patch) | |
| tree | 06750fc3b72af0fefd004cd41aff1eb8d5c1aff5 /components | |
| parent | ec0e5489736d4e74a6ca5687598600f2357c6d47 (diff) | |
[components][finsh] Fix shell re-initialization check code to supported C89.
Diffstat (limited to 'components')
| -rw-r--r-- | components/finsh/shell.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index bd6f41cfd5..ccd5b97306 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -791,12 +791,6 @@ int finsh_system_init(void) rt_err_t result = RT_EOK; rt_thread_t tid; - if(shell) - { - rt_kprintf("finsh shell already init.\n"); - return RT_EOK; - } - #ifdef FINSH_USING_SYMTAB #ifdef __CC_ARM /* ARM C Compiler */ extern const int FSymTab$$Base; @@ -825,6 +819,12 @@ int finsh_system_init(void) finsh_system_var_init(&__vsymtab_start, &__vsymtab_end); #elif defined(_MSC_VER) unsigned int *ptr_begin, *ptr_end; + + if(shell) + { + rt_kprintf("finsh shell already init.\n"); + return RT_EOK; + } ptr_begin = (unsigned int *)&__fsym_begin; ptr_begin += (sizeof(struct finsh_syscall) / sizeof(unsigned int)); |
