]> The Tcpdump Group git mirrors - tcpdump/commitdiff
OSPF: Remove two unnecessary dereferences
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 18 Feb 2022 19:34:18 +0000 (20:34 +0100)
committerGuy Harris <[email protected]>
Sun, 17 Jul 2022 05:47:12 +0000 (22:47 -0700)
Remove also two unnecessary ND_TCHECK_SIZE().

(cherry picked from commit aca18478998aef90a726935eb532283c959c5119)

print-ospf.c

index d3f519c3bb223a351f40fec265bd0e3dfae201f2..9fe9123ccfddc6ce3c6d9594abb84ef6dd66bfe4 100644 (file)
@@ -697,8 +697,7 @@ ospf_print_lsa(netdissect_options *ndo,
                    GET_IPADDR_STRING(lsap->lsa_un.un_nla.nla_mask));
                ap = lsap->lsa_un.un_nla.nla_router;
                while ((const u_char *)ap < ls_end) {
-                       ND_TCHECK_SIZE(ap);
-                       ND_PRINT("\n\t      %s", GET_IPADDR_STRING(*ap));
+                       ND_PRINT("\n\t      %s", GET_IPADDR_STRING(ap));
                        ++ap;
                }
                break;
@@ -1000,8 +999,7 @@ ospf_decode_v2(netdissect_options *ndo,
                if ((const u_char *)ap < dataend)
                        ND_PRINT("\n\t  Neighbor List:");
                while ((const u_char *)ap < dataend) {
-                       ND_TCHECK_SIZE(ap);
-                       ND_PRINT("\n\t    %s", GET_IPADDR_STRING(*ap));
+                       ND_PRINT("\n\t    %s", GET_IPADDR_STRING(ap));
                        ++ap;
                }
                break;  /* HELLO */