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/nuttx.git

commit 1cc3fd59ed5f8d9f42948dd93c4b890e4d92f733
Author: yinshengkai <[email protected]>
AuthorDate: Mon Mar 13 22:44:33 2023 +0800

    libc/syslogstream: fix nxstyle error
    
    Signed-off-by: yinshengkai <[email protected]>
---
 libs/libc/stream/lib_syslogstream.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libs/libc/stream/lib_syslogstream.c 
b/libs/libc/stream/lib_syslogstream.c
index 21eb8654f9..961a6b1b61 100644
--- a/libs/libc/stream/lib_syslogstream.c
+++ b/libs/libc/stream/lib_syslogstream.c
@@ -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

Reply via email to