提交 f7972f79 编写于 作者: O openharmony_ci 提交者: Gitee

!113 修复两个无符号数错误的比较方法

Merge pull request !113 from lnlan/musl_issue
......@@ -11,7 +11,7 @@ size_t __stdio_read(FILE *f, unsigned char *buf, size_t len)
ssize_t cnt;
cnt = read(f->fd, iov[0].iov_base, iov[0].iov_len);
if (iov[1].iov_len - iov[0].iov_len > 0) cnt += read(f->fd, iov[1].iov_base, iov[1].iov_len - iov[0].iov_len);
if (iov[1].iov_len > iov[0].iov_len) cnt += read(f->fd, iov[1].iov_base, iov[1].iov_len - iov[0].iov_len);
if (cnt <= 0) {
f->flags |= cnt ? F_ERR : F_EOF;
return 0;
......@@ -22,4 +22,4 @@ size_t __stdio_read(FILE *f, unsigned char *buf, size_t len)
f->rend = f->buf + cnt;
if (f->buf_size) buf[len-1] = *f->rpos++;
return len;
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册