summaryrefslogtreecommitdiff
path: root/net/x25/x25_route.c
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-10-23 05:21:56 +0000
committerDavid S. Miller <davem@davemloft.net>2009-10-29 01:39:53 -0700
commit091bb8ab51c668635d1a75359019005921676881 (patch)
tree6cecf1abd03209db800880cb090e24cdf58146e4 /net/x25/x25_route.c
parent50e4fe91a5edbf680853b2ca37300a47ff860d63 (diff)
net: Cleanup redundant tests on unsigned
If there is data, the unsigned skb->len is greater than 0. rt.sigdigits is unsigned as well, so the test `>= 0' is always true, the other part of the test catches wrapped values. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25/x25_route.c')
-rw-r--r--net/x25/x25_route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/x25/x25_route.c b/net/x25/x25_route.c
index 2c999ccf504a..66961ea28c91 100644
--- a/net/x25/x25_route.c
+++ b/net/x25/x25_route.c
@@ -190,7 +190,7 @@ int x25_route_ioctl(unsigned int cmd, void __user *arg)
goto out;
rc = -EINVAL;
- if (rt.sigdigits < 0 || rt.sigdigits > 15)
+ if (rt.sigdigits > 15)
goto out;
dev = x25_dev_get(rt.device);