xiaoxiang781216 commented on code in PR #8012:
URL: https://github.com/apache/nuttx/pull/8012#discussion_r1059504888


##########
libs/libc/stream/lib_syslogstream.c:
##########
@@ -103,6 +102,37 @@ static void syslogstream_addchar(FAR struct 
lib_syslogstream_s *stream,
       syslogstream_flush(stream);
     }
 }
+
+int syslogstream_addstring(FAR struct lib_syslogstream_s *stream,
+                           FAR const char *buff, int len)
+{
+  FAR struct iob_s *iob = stream->iob;
+  uint16_t ret = 0;
+
+  do
+    {
+      int remain = CONFIG_IOB_BUFSIZE - iob->io_len;
+      remain = (remain > len) ? len : remain;

Review Comment:
   remove ()



##########
libs/libc/stream/lib_syslogstream.c:
##########
@@ -103,6 +102,37 @@ static void syslogstream_addchar(FAR struct 
lib_syslogstream_s *stream,
       syslogstream_flush(stream);
     }
 }
+
+int syslogstream_addstring(FAR struct lib_syslogstream_s *stream,
+                           FAR const char *buff, int len)
+{
+  FAR struct iob_s *iob = stream->iob;
+  uint16_t ret = 0;

Review Comment:
   why use uint16_t not int



##########
libs/libc/stream/lib_syslogstream.c:
##########
@@ -103,6 +102,37 @@ static void syslogstream_addchar(FAR struct 
lib_syslogstream_s *stream,
       syslogstream_flush(stream);
     }
 }
+
+int syslogstream_addstring(FAR struct lib_syslogstream_s *stream,

Review Comment:
   add static



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to