mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 01:54:00 +00:00
sctp: remove dup code in net/sctp/socket.c
Remove dup check of "if (optlen < sizeof(int))". Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
906f8257ee
commit
d212318c9d
@ -3069,9 +3069,6 @@ static int sctp_setsockopt_maxburst(struct sock *sk,
|
|||||||
int val;
|
int val;
|
||||||
int assoc_id = 0;
|
int assoc_id = 0;
|
||||||
|
|
||||||
if (optlen < sizeof(int))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (optlen == sizeof(int)) {
|
if (optlen == sizeof(int)) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"SCTP: Use of int in max_burst socket option deprecated\n");
|
"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_sock *sp;
|
||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
|
|
||||||
if (len < sizeof(int))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (len == sizeof(int)) {
|
if (len == sizeof(int)) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"SCTP: Use of int in max_burst socket option deprecated\n");
|
"SCTP: Use of int in max_burst socket option deprecated\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user