net: Cleanup redundant tests on unsigned
optlen is unsigned so the `< 0' test is never true. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
091bb8ab51
commit
65a1c4fffa
@@ -480,7 +480,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
|
||||
case IP_OPTIONS:
|
||||
{
|
||||
struct ip_options *opt = NULL;
|
||||
if (optlen > 40 || optlen < 0)
|
||||
if (optlen > 40)
|
||||
goto e_inval;
|
||||
err = ip_options_get_from_user(sock_net(sk), &opt,
|
||||
optval, optlen);
|
||||
|
Reference in New Issue
Block a user