From 8521cbe3fc8451ff6dfa2766f34f8a24d256162a Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 14 Jul 2022 15:52:51 +0800 Subject: [PATCH] drivers/syslog: Call up_puts instead up_putc one by one Signed-off-by: Xiang Xiao --- 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 41d24d073a147..60cf1853687e8 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