SELinux: remove unused and shadowed addrlen variable
PATCH 1/1 SELinux: remove unused and shadowed addrlen variable
Please review.
----
Remove unused and shadowed addrlen variable. Picked up by sparse.
Signed-off-by James Morris <[email protected]>
--- security/selinux/hooks.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
security/selinux/hooks.c +1 -3
@@ -3669,7 +3669,7 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, instruct 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;
@@ -3677,12 +3677,10 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, inif (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; }
Signature · 7 lines
1.5.5.1 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 6 lines · James Morris
Please review.
----
Remove unused and shadowed addrlen variable. Picked up by sparse.Signed-off-by James Morris <[email protected]>
It was used previously but obsoleted by the netnode cache interface.
Acked-by Stephen Smalley <[email protected]>
Quoted 30 lines
--- security/selinux/hooks.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)security/selinux/hooks.c +1
-3@@ -3669,7 +3669,7 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, instruct 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;@@ -3677,12 +3677,10 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, inif (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; }
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Paul Moore
Acked-byQuoted 11 lines · Stephen Smalley
Quoted 6 lines · James Morris
Please review.
----
Remove unused and shadowed addrlen variable. Picked up by sparse.Signed-off-by James Morris <[email protected]>It was used previously but obsoleted by the netnode cache interface.
Acked-by Stephen Smalley <[email protected]>
Yes, I removed a bunch of similar address length variables but it looks like I missed one - sorry about that.
Acked-by Paul Moore <[email protected]>
Quoted 30 lines
Quoted 30 lines
--- security/selinux/hooks.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)security/selinux/hooks.c +1
-1@@ -3669,7 +3669,7 @@ 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;security/selinux/hooks.c +0
-2isec =SOCK_INODE (sock)->i_security;@@ -3677,12 +3677,10 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, in 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; }
Signature · 7 lines
paul moore linux @ hp -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.