Commit e399f982 authored by James Morris's avatar James Morris

SELinux: remove unused and shadowed addrlen variable

Remove unused and shadowed addrlen variable.  Picked up by sparse.
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
Acked-by: default avatarPaul Moore <paul.moore@hp.com>
parent 6cbe2706
...@@ -3669,7 +3669,7 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in ...@@ -3669,7 +3669,7 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in
struct sockaddr_in6 *addr6 = NULL; struct sockaddr_in6 *addr6 = NULL;
unsigned short snum; unsigned short snum;
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
u32 sid, node_perm, addrlen; u32 sid, node_perm;
tsec = current->security; tsec = current->security;
isec = SOCK_INODE(sock)->i_security; isec = SOCK_INODE(sock)->i_security;
...@@ -3677,12 +3677,10 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in ...@@ -3677,12 +3677,10 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in
if (family == PF_INET) { if (family == PF_INET) {
addr4 = (struct sockaddr_in *)address; addr4 = (struct sockaddr_in *)address;
snum = ntohs(addr4->sin_port); snum = ntohs(addr4->sin_port);
addrlen = sizeof(addr4->sin_addr.s_addr);
addrp = (char *)&addr4->sin_addr.s_addr; addrp = (char *)&addr4->sin_addr.s_addr;
} else { } else {
addr6 = (struct sockaddr_in6 *)address; addr6 = (struct sockaddr_in6 *)address;
snum = ntohs(addr6->sin6_port); snum = ntohs(addr6->sin6_port);
addrlen = sizeof(addr6->sin6_addr.s6_addr);
addrp = (char *)&addr6->sin6_addr.s6_addr; addrp = (char *)&addr6->sin6_addr.s6_addr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment