提交 9968e673 编写于 作者: L lnlan

fix: 修复sigwait等待到的信号值与获取的siginfo中的值不一致

【背景】
处理issue,两个无符号数比较大小的方法有问题
【修改方案】
1.由a-b>0修改为a>b的方式

【影响】
对现有的产品编译不会有影响。

re #I48CM3
Signed-off-by: Nlanleinan <lanleinan@163.com>
Change-Id: I93bf5e603ca3f257e44a023e9814fd4d7d5004ae
上级 6a3f2f98
......@@ -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.
先完成此消息的编辑!
想要评论请 注册