sctp: remove an if() that is always true
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thu, 26 Apr 2018 19:58:52 +0000 (16:58 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 18:35:22 +0000 (14:35 -0400)
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>
net/sctp/associola.c

index b3aa952..c5ed09c 100644 (file)
@@ -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);