From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner Subject: [PATCH net-next 03/13] sctp: remove an if() that is always true Date: Thu, 26 Apr 2018 16:58:52 -0300 Message-ID: References: Cc: linux-sctp@vger.kernel.org, Vlad Yasevich , Neil Horman , Xin Long To: netdev@vger.kernel.org Return-path: Received: from mail-qk0-f195.google.com ([209.85.220.195]:35826 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754582AbeDZT7X (ORCPT ); Thu, 26 Apr 2018 15:59:23 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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 --- 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 b3aa95222bd52113295cb246c503c903bdd5c353..c5ed09cfa8423b17546e3d45f6d06db03af66384 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.14.3