mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
tcp: '< 0' test on unsigned
promote 'cnt' to size_t, to match 'len'. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8db09f26f9
commit
a2025b8b10
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user