You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/17 14:31:27 UTC
[incubator-nuttx] 03/04: drivers/syslog: Call up_puts instead up_putc one by one
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 8254ad9159d19db024ce401fa2b0f8fd1ad5bee3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Jul 14 15:52:51 2022 +0800
drivers/syslog: Call up_puts instead up_putc one by one
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
drivers/syslog/syslog_channel.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c
index 41d24d073a..60cf185368 100644
--- a/drivers/syslog/syslog_channel.c
+++ b/drivers/syslog/syslog_channel.c
@@ -218,14 +218,9 @@ static ssize_t syslog_default_write(FAR struct syslog_channel_s *channel,
{
#if defined(CONFIG_ARCH_LOWPUTC)
static sem_t sem = SEM_INITIALIZER(1);
- size_t nwritten;
nxsem_wait(&sem);
- for (nwritten = 0; nwritten < buflen; nwritten++)
- {
- up_putc(buffer[nwritten]);
- }
-
+ up_puts(buffer);
nxsem_post(&sem);
#endif