summaryrefslogtreecommitdiff
path: root/components/libc
diff options
context:
space:
mode:
authorAligagago <[email protected]>2022-07-25 10:21:18 +0800
committerguo <[email protected]>2022-07-27 11:45:29 +0800
commit250b3cbc16d2632afa392f9857d044dac25b95f8 (patch)
treeaa38c868801385e07590cf8d499d3fb2efbfc322 /components/libc
parent1b55a1dedd0559de4edf9dac57199f75947173c3 (diff)
使用 AStyle.exe 统一代码格式
Diffstat (limited to 'components/libc')
-rw-r--r--components/libc/compilers/armlibc/syscall_mem.c4
-rw-r--r--components/libc/compilers/armlibc/syscalls.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/components/libc/compilers/armlibc/syscall_mem.c b/components/libc/compilers/armlibc/syscall_mem.c
index b5403dfaf3..f831bd173b 100644
--- a/components/libc/compilers/armlibc/syscall_mem.c
+++ b/components/libc/compilers/armlibc/syscall_mem.c
@@ -23,8 +23,8 @@
#endif /* RT_USING_HEAP */
#ifdef __CC_ARM
-/* avoid the heap and heap-using library functions supplied by arm */
-#pragma import(__use_no_heap)
+ /* avoid the heap and heap-using library functions supplied by arm */
+ #pragma import(__use_no_heap)
#endif /* __CC_ARM */
void *malloc(size_t n)
diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c
index e1818dc90e..bef92599d6 100644
--- a/components/libc/compilers/armlibc/syscalls.c
+++ b/components/libc/compilers/armlibc/syscalls.c
@@ -23,7 +23,7 @@
#include <sys/stat.h>
#include <compiler_private.h>
#ifdef RT_USING_POSIX_STDIO
-#include "libc.h"
+ #include "libc.h"
#endif /* RT_USING_POSIX_STDIO */
#define DBG_TAG "armlibc.syscalls"
@@ -31,9 +31,9 @@
#include <rtdbg.h>
#ifdef __clang__
-__asm(".global __use_no_semihosting\n\t");
+ __asm(".global __use_no_semihosting\n\t");
#else
-#pragma import(__use_no_semihosting_swi)
+ #pragma import(__use_no_semihosting_swi)
#endif
/* Standard IO device handles. */
@@ -285,7 +285,7 @@ RT_WEAK void _sys_exit(int return_code)
{
extern void __rt_libc_exit(int status);
__rt_libc_exit(return_code);
- while(1);
+ while (1);
}
/**
@@ -312,7 +312,7 @@ long _sys_flen(FILEHANDLE fh)
int _sys_istty(FILEHANDLE fh)
{
- if((STDIN <= fh) && (fh <= STDERR))
+ if ((STDIN <= fh) && (fh <= STDERR))
return 1;
else
return 0;
@@ -352,7 +352,7 @@ int fgetc(FILE *f)
return 0;
}
- if(read(STDIN_FILENO, &ch, 1) == 1)
+ if (read(STDIN_FILENO, &ch, 1) == 1)
return ch;
#endif /* RT_USING_POSIX_STDIO */
LOG_W("%s: %s", __func__, _WARNING_WITHOUT_STDIO);