diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2010-01-15 04:08:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-15 04:08:58 -0500 |
commit | 4d0392be21d4710121f855c0caf57d32ffd1ced0 (patch) | |
tree | e3f18e591787212918c053532be85657bc202e65 /net/core | |
parent | 9a58a80a701bdb2d220cdab4914218df5b48d781 (diff) |
net/core/sock.c: quiet sparse noise
In sock_getsockopt the symbol 'lv' is declared as an
unsigned int type, probably due to sizeof returning a
size_t which is really an unsigned int.
This produces a sparse warning for SO_PEERNAME due to
the sock->ops->getname() call:
warning: incorrect type in argument 3 (different signedness)
expected int *sockaddr_len
got unsigned int *<noident>
Quiet the warning by changing the type of 'lv' to an int.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index e1f6f225f012..10b1d3243a72 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -741,7 +741,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
741 | struct timeval tm; | 741 | struct timeval tm; |
742 | } v; | 742 | } v; |
743 | 743 | ||
744 | unsigned int lv = sizeof(int); | 744 | int lv = sizeof(int); |
745 | int len; | 745 | int len; |
746 | 746 | ||
747 | if (get_user(len, optlen)) | 747 | if (get_user(len, optlen)) |