Skip to content

Commit

Permalink
drivers/syslog: Call up_puts instead up_putc one by one
Browse files Browse the repository at this point in the history
Signed-off-by: Xiang Xiao <[email protected]>
  • Loading branch information
xiaoxiang781216 committed Jul 14, 2022
1 parent 6969767 commit 8521cbe
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/syslog/syslog_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8521cbe

Please sign in to comment.