提交 05f1b12f 编写于 作者: C Colin Ian King 提交者: David S. Miller

net: x25: remove null checks on arrays calling_ae and called_ae

dtefacs.calling_ae and called_ae are both 20 element __u8 arrays and
cannot be null and hence are redundant checks. Remove these.
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c24acf03
......@@ -1500,12 +1500,8 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
goto out_dtefac_release;
if (dtefacs.calling_len > X25_MAX_AE_LEN)
goto out_dtefac_release;
if (dtefacs.calling_ae == NULL)
goto out_dtefac_release;
if (dtefacs.called_len > X25_MAX_AE_LEN)
goto out_dtefac_release;
if (dtefacs.called_ae == NULL)
goto out_dtefac_release;
x25->dte_facilities = dtefacs;
rc = 0;
out_dtefac_release:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册