diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/packet/af_packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 4b508782c44b..ade1ebd15364 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1500,7 +1500,7 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv static int packet_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen) { - int len; + unsigned int len; int val; struct sock *sk = sock->sk; struct packet_sock *po = pkt_sk(sk); @@ -1513,7 +1513,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, if (get_user(len, optlen)) return -EFAULT; - if (len < 0) + if ((int)len < 0) return -EINVAL; switch(optname) { |