xiaoxiang781216 commented on code in PR #8756:
URL: https://github.com/apache/nuttx/pull/8756#discussion_r1127710596
##########
libs/libc/stdio/lib_libvsprintf.c:
##########
@@ -947,16 +949,9 @@ static int vsprintf_internal(FAR struct lib_outstream_s
*stream,
}
}
- while (size)
- {
- stream_putc(*pnt++, stream);
- if (width != 0)
- {
- width -= 1;
- }
-
- size -= 1;
- }
+ stream_puts(pnt, size, stream);
+ width = width >= size ? width - size : 0;
+ size -= size;
Review Comment:
```suggestion
size = 0;
```
--
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]