提交 64a124ed 编写于 作者: D Dmitry Popov 提交者: David S. Miller

tcp: md5: remove unneeded check in tcp_v4_parse_md5_keys

tcpm_key is an array inside struct tcp_md5sig, there is no need to check it
against NULL.
Signed-off-by: NDmitry Popov <ixaphire@qrator.net>
Acked-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 06b47aac
......@@ -1049,7 +1049,7 @@ static int tcp_v4_parse_md5_keys(struct sock *sk, char __user *optval,
if (sin->sin_family != AF_INET)
return -EINVAL;
if (!cmd.tcpm_key || !cmd.tcpm_keylen)
if (!cmd.tcpm_keylen)
return tcp_md5_do_del(sk, (union tcp_md5_addr *)&sin->sin_addr.s_addr,
AF_INET);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册