summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2018-04-26 16:58:52 -0300
committerDavid S. Miller <davem@davemloft.net>2018-04-27 14:35:22 -0400
commitc88da20f95ad0bfa49e3e9035c26aaac0b05d11d (patch)
tree40df20287e49af647cff4b2dcef7158459607e8e /net/sctp
parent800e00c12733fe2ed565206dcdb515fa2f705b9f (diff)
downloadlinux-c88da20f95ad0bfa49e3e9035c26aaac0b05d11d.tar.gz
linux-c88da20f95ad0bfa49e3e9035c26aaac0b05d11d.tar.bz2
linux-c88da20f95ad0bfa49e3e9035c26aaac0b05d11d.zip
sctp: remove an if() that is always true
As noticed by Xin Long, the if() here is always true as PMTU can never be 0. Reported-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/associola.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index b3aa95222bd5..c5ed09cfa842 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1397,10 +1397,8 @@ void sctp_assoc_sync_pmtu(struct sctp_association *asoc)
pmtu = t->pathmtu;
}
- if (pmtu) {
- asoc->pathmtu = pmtu;
- asoc->frag_point = sctp_frag_point(asoc, pmtu);
- }
+ asoc->pathmtu = pmtu;
+ asoc->frag_point = sctp_frag_point(asoc, pmtu);
pr_debug("%s: asoc:%p, pmtu:%d, frag_point:%d\n", __func__, asoc,
asoc->pathmtu, asoc->frag_point);