libc/stream: fix syslogstream_addstring length error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
17f410e647
commit
2466c07aa3
@ -112,7 +112,7 @@ static int syslogstream_addstring(FAR struct lib_syslogstream_s *stream,
|
||||
do
|
||||
{
|
||||
int remain = CONFIG_IOB_BUFSIZE - iob->io_len;
|
||||
remain = remain > len ? len : remain;
|
||||
remain = remain > len - ret ? len - ret : remain;
|
||||
memcpy(iob->io_data + iob->io_len, buff + ret, remain);
|
||||
iob->io_len += remain;
|
||||
ret += remain;
|
||||
|
Loading…
Reference in New Issue
Block a user