]> The Tcpdump Group git mirrors - tcpdump/commitdiff
TCP: Remove an useless test
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 5 Jul 2020 09:28:48 +0000 (11:28 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 5 Jul 2020 09:28:56 +0000 (11:28 +0200)
The length is tested in ldp_print().

print-tcp.c

index 88870c6518be5bf0005de7d8eb7a43511f66ddf5..79dc6c619a67c67dbe6e205ddab69f0ff5b1eccd 100644 (file)
@@ -753,7 +753,7 @@ tcp_print(netdissect_options *ndo,
                 msdp_print(ndo, bp, length);
         } else if (IS_SRC_OR_DST_PORT(RPKI_RTR_PORT)) {
                 rpki_rtr_print(ndo, bp, length);
-        } else if (length > 0 && (IS_SRC_OR_DST_PORT(LDP_PORT))) {
+        } else if (IS_SRC_OR_DST_PORT(LDP_PORT)) {
                 ldp_print(ndo, bp, length);
         } else if ((IS_SRC_OR_DST_PORT(NFS_PORT)) &&
                  length >= 4 && ND_TTEST_4(bp)) {