提交 d212318c 编写于 作者: W Wei Yongjun 提交者: David S. Miller

sctp: remove dup code in net/sctp/socket.c

Remove dup check of "if (optlen < sizeof(int))".
Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 906f8257
......@@ -3069,9 +3069,6 @@ static int sctp_setsockopt_maxburst(struct sock *sk,
int val;
int assoc_id = 0;
if (optlen < sizeof(int))
return -EINVAL;
if (optlen == sizeof(int)) {
printk(KERN_WARNING
"SCTP: Use of int in max_burst socket option deprecated\n");
......@@ -5283,9 +5280,6 @@ static int sctp_getsockopt_maxburst(struct sock *sk, int len,
struct sctp_sock *sp;
struct sctp_association *asoc;
if (len < sizeof(int))
return -EINVAL;
if (len == sizeof(int)) {
printk(KERN_WARNING
"SCTP: Use of int in max_burst socket option deprecated\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册