Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2025b8b authored by Roel Kluin's avatar Roel Kluin Committed by David S. Miller
Browse files

tcp: '< 0' test on unsigned



promote 'cnt' to size_t, to match 'len'.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8db09f26
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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) {