提交 a2025b8b 编写于 作者: R Roel Kluin 提交者: David S. Miller

tcp: '< 0' test on unsigned

promote 'cnt' to size_t, to match 'len'.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8db09f26
......@@ -165,9 +165,10 @@ static int tcpprobe_sprint(char *tbuf, int n)
static ssize_t tcpprobe_read(struct file *file, char __user *buf,
size_t len, loff_t *ppos)
{
int error = 0, cnt = 0;
int error = 0;
size_t cnt = 0;
if (!buf || len < 0)
if (!buf)
return -EINVAL;
while (cnt < len) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册