Skip to content

Commit

Permalink
SELinux: remove unused and shadowed addrlen variable
Browse files Browse the repository at this point in the history
Remove unused and shadowed addrlen variable.  Picked up by sparse.

Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Paul Moore <paul.moore@hp.com>
  • Loading branch information
James Morris committed Jul 14, 2008
1 parent 6cbe270 commit e399f98
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3669,20 +3669,18 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in
struct sockaddr_in6 *addr6 = NULL;
unsigned short snum;
struct sock *sk = sock->sk;
u32 sid, node_perm, addrlen;
u32 sid, node_perm;

tsec = current->security;
isec = SOCK_INODE(sock)->i_security;

if (family == PF_INET) {
addr4 = (struct sockaddr_in *)address;
snum = ntohs(addr4->sin_port);
addrlen = sizeof(addr4->sin_addr.s_addr);
addrp = (char *)&addr4->sin_addr.s_addr;
} else {
addr6 = (struct sockaddr_in6 *)address;
snum = ntohs(addr6->sin6_port);
addrlen = sizeof(addr6->sin6_addr.s6_addr);
addrp = (char *)&addr6->sin6_addr.s6_addr;
}

Expand Down

0 comments on commit e399f98

Please sign in to comment.