summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-03-13 23:05:14 (GMT)
committerDavid S. Miller <davem@davemloft.net>2009-03-13 23:05:14 (GMT)
commita2025b8b1039e5abaa38319b2eaab3b17867479a (patch)
tree563c6542ad52663144a71485e4286483b5c3b23a
parent8db09f26f912f7c90c764806e804b558da520d4f (diff)
downloadlinux-fsl-qoriq-a2025b8b1039e5abaa38319b2eaab3b17867479a.tar.xz
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>
-rw-r--r--net/ipv4/tcp_probe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index 25524d4..59f5b5e 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -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) {