From c88da20f95ad0bfa49e3e9035c26aaac0b05d11d Mon Sep 17 00:00:00 2001 From: Marcelo Ricardo Leitner Date: Thu, 26 Apr 2018 16:58:52 -0300 Subject: [PATCH] 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 Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller --- net/sctp/associola.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/sctp/associola.c b/net/sctp/associola.c index b3aa952..c5ed09c 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); -- 2.7.4