summaryrefslogtreecommitdiff
path: root/components/libc/compilers/armlibc/syscalls.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-12-29 13:59:46 -0500
committerBernard Xiong <[email protected]>2022-01-05 23:12:41 +0800
commite6fd3ffcd9b5e8d4348db66bd42d9e0ec890533b (patch)
tree89c8ae1dfcb4b2cb5bebc0912bbeac8ef6b9ab46 /components/libc/compilers/armlibc/syscalls.c
parente1a17f0bbc2562e1d3676fb25232250b6ef9183e (diff)
[libc]修理一些细节问题
Diffstat (limited to 'components/libc/compilers/armlibc/syscalls.c')
-rw-r--r--components/libc/compilers/armlibc/syscalls.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c
index 2dd90cb27c..f4ced9d3c0 100644
--- a/components/libc/compilers/armlibc/syscalls.c
+++ b/components/libc/compilers/armlibc/syscalls.c
@@ -276,10 +276,7 @@ char *_sys_command_string(char *cmd, int len)
void _ttywrch(int ch)
{
#ifdef RT_USING_CONSOLE
- char c;
-
- c = (char)ch;
- rt_kprintf(&c);
+ rt_kprintf("%c", (char)ch);
#endif /* RT_USING_CONSOLE */
}
@@ -337,10 +334,7 @@ int remove(const char *filename)
int fputc(int c, FILE *f)
{
#ifdef RT_USING_CONSOLE
- char ch[2] = {0};
-
- ch[0] = c;
- rt_kprintf(&ch[0]);
+ rt_kprintf("%c", (char)c);
return 1;
#else
return 0; /* error */