aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-06-20 16:11:21 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-21 11:19:35 -0400
commit083a0326aee480008d52612d5118ff9c13301f6a (patch)
treec97f466496f980f652c5d813ba42b9a63d76e1da /net/ipv4/tcp_ipv4.c
parente1d20e22dd67cc2df0c235668ed42e91e6dddd58 (diff)
tcp: md5: hide unused variable
Changing from a memcpy to per-member comparison left the size variable unused: net/ipv4/tcp_ipv4.c: In function 'tcp_md5_do_lookup': net/ipv4/tcp_ipv4.c:910:15: error: unused variable 'size' [-Werror=unused-variable] This does not show up when CONFIG_IPV6 is enabled, but the variable can be removed either way, along with the now unused assignment. Fixes: 6797318e623d ("tcp: md5: add an address prefix for key lookup") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index bf407f3e20dd..e20bcf0061af 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -907,7 +907,6 @@ struct tcp_md5sig_key *tcp_md5_do_lookup(const struct sock *sk,
907{ 907{
908 const struct tcp_sock *tp = tcp_sk(sk); 908 const struct tcp_sock *tp = tcp_sk(sk);
909 struct tcp_md5sig_key *key; 909 struct tcp_md5sig_key *key;
910 unsigned int size = sizeof(struct in_addr);
911 const struct tcp_md5sig_info *md5sig; 910 const struct tcp_md5sig_info *md5sig;
912 __be32 mask; 911 __be32 mask;
913 struct tcp_md5sig_key *best_match = NULL; 912 struct tcp_md5sig_key *best_match = NULL;
@@ -918,10 +917,7 @@ struct tcp_md5sig_key *tcp_md5_do_lookup(const struct sock *sk,
918 lockdep_sock_is_held(sk)); 917 lockdep_sock_is_held(sk));
919 if (!md5sig) 918 if (!md5sig)
920 return NULL; 919 return NULL;
921#if IS_ENABLED(CONFIG_IPV6) 920
922 if (family == AF_INET6)
923 size = sizeof(struct in6_addr);
924#endif
925 hlist_for_each_entry_rcu(key, &md5sig->head, node) { 921 hlist_for_each_entry_rcu(key, &md5sig->head, node) {
926 if (key->family != family) 922 if (key->family != family)
927 continue; 923 continue;