libc/syslogstream: fix nxstyle error

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-03-13 22:44:33 +08:00 committed by Petro Karashchenko
parent ca290e85ea
commit 1cc3fd59ed

View File

@ -197,7 +197,7 @@ static int syslogstream_puts(FAR struct lib_outstream_s *this,
{
FAR struct lib_syslogstream_s *stream =
(FAR struct lib_syslogstream_s *)this;
int ret = 0;
int ret;
DEBUGASSERT(stream != NULL);
if (len <= 0)
@ -205,7 +205,7 @@ static int syslogstream_puts(FAR struct lib_outstream_s *this,
return 0;
}
stream->last_ch = ((FAR const char *)buff)[len -1];
stream->last_ch = ((FAR const char *)buff)[len - 1];
#ifdef CONFIG_SYSLOG_BUFFER
/* Do we have an IO buffer? */
@ -214,7 +214,7 @@ static int syslogstream_puts(FAR struct lib_outstream_s *this,
{
/* Add the incoming string to the buffer */
ret += syslogstream_addstring(stream, buff, len);
ret = syslogstream_addstring(stream, buff, len);
}
else
#endif