Skip to content

Commit 4d0392b

Browse files
bigguinessdavem330
authored andcommitted
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>
1 parent 9a58a80 commit 4d0392b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/sock.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
741741
struct timeval tm;
742742
} v;
743743

744-
unsigned int lv = sizeof(int);
744+
int lv = sizeof(int);
745745
int len;
746746

747747
if (get_user(len, optlen))

0 commit comments

Comments
 (0)