aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthias M. Dellweg <2500@gmx.de>2007-10-29 23:55:27 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-30 01:37:27 -0400
commitb0a713e9e6091b30d0e615d2be88017a57f37c76 (patch)
treeb83975b197785e38a1535638cb326639c09abcc4 /net
parentc940587bf603b4295a7f5e9ff8fed123368a1ef7 (diff)
[TCP] MD5: Remove some more unnecessary casting.
while reviewing the tcp_md5-related code further i came across with another two of these casts which you probably have missed. I don't actually think that they impose a problem by now, but as you said we should remove them. Signed-off-by: Matthias M. Dellweg <2500@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_ipv4.c10
-rw-r--r--net/ipv6/tcp_ipv6.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index ad759f1c3777..d3d8d5dfcee3 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -858,16 +858,16 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
858 u8 *newkey, u8 newkeylen) 858 u8 *newkey, u8 newkeylen)
859{ 859{
860 /* Add Key to the list */ 860 /* Add Key to the list */
861 struct tcp4_md5sig_key *key; 861 struct tcp_md5sig_key *key;
862 struct tcp_sock *tp = tcp_sk(sk); 862 struct tcp_sock *tp = tcp_sk(sk);
863 struct tcp4_md5sig_key *keys; 863 struct tcp4_md5sig_key *keys;
864 864
865 key = (struct tcp4_md5sig_key *)tcp_v4_md5_do_lookup(sk, addr); 865 key = tcp_v4_md5_do_lookup(sk, addr);
866 if (key) { 866 if (key) {
867 /* Pre-existing entry - just update that one. */ 867 /* Pre-existing entry - just update that one. */
868 kfree(key->base.key); 868 kfree(key->key);
869 key->base.key = newkey; 869 key->key = newkey;
870 key->base.keylen = newkeylen; 870 key->keylen = newkeylen;
871 } else { 871 } else {
872 struct tcp_md5sig_info *md5sig; 872 struct tcp_md5sig_info *md5sig;
873 873
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 85208026278b..f1523b82cac1 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -561,16 +561,16 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
561 char *newkey, u8 newkeylen) 561 char *newkey, u8 newkeylen)
562{ 562{
563 /* Add key to the list */ 563 /* Add key to the list */
564 struct tcp6_md5sig_key *key; 564 struct tcp_md5sig_key *key;
565 struct tcp_sock *tp = tcp_sk(sk); 565 struct tcp_sock *tp = tcp_sk(sk);
566 struct tcp6_md5sig_key *keys; 566 struct tcp6_md5sig_key *keys;
567 567
568 key = (struct tcp6_md5sig_key*) tcp_v6_md5_do_lookup(sk, peer); 568 key = tcp_v6_md5_do_lookup(sk, peer);
569 if (key) { 569 if (key) {
570 /* modify existing entry - just update that one */ 570 /* modify existing entry - just update that one */
571 kfree(key->base.key); 571 kfree(key->key);
572 key->base.key = newkey; 572 key->key = newkey;
573 key->base.keylen = newkeylen; 573 key->keylen = newkeylen;
574 } else { 574 } else {
575 /* reallocate new list if current one is full. */ 575 /* reallocate new list if current one is full. */
576 if (!tp->md5sig_info) { 576 if (!tp->md5sig_info) {