pkarashchenko commented on code in PR #8685:
URL: https://github.com/apache/nuttx/pull/8685#discussion_r1123759291


##########
libs/libc/stream/lib_stdsistream.c:
##########
@@ -52,6 +52,29 @@ static int stdsistream_getc(FAR struct lib_sistream_s *this)
   return ret;
 }
 
+/****************************************************************************
+ * Name: stdsistream_gets
+ ****************************************************************************/
+
+static int stdsistream_gets(FAR struct lib_instream_s *this,
+                            FAR void *buffer, int len)
+{
+  FAR struct lib_stdsistream_s *sthis = (FAR struct lib_stdsistream_s *)this;
+  int nread = 0;
+
+  DEBUGASSERT(this);
+
+  /* Get the buffer from the incoming stream */
+
+  nread = fread(buffer, len, 1, sthis->stream);
+  if (nread >= 0)
+    {
+      this->nget += nread;
+    }

Review Comment:
   Don't we need 
   ```
     else
       {
         nread = _NX_GETERRVAL(nread);
       }
   ```
   here as well?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to