From: Roel Kluin Date: Fri, 13 Mar 2009 23:05:14 +0000 (-0700) Subject: tcp: '< 0' test on unsigned X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a2025b8b1039e5abaa38319b2eaab3b17867479a;p=linux-2.6-omap-h63xx.git tcp: '< 0' test on unsigned promote 'cnt' to size_t, to match 'len'. Signed-off-by: Roel Kluin Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 25524d4e372..59f5b5e7c56 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) {