From: Francois-Xavier Le Bail Date: Fri, 18 Feb 2022 19:34:18 +0000 (+0100) Subject: OSPF: Remove two unnecessary dereferences X-Git-Tag: tcpdump-4.99.2~68 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/6bd9a10412ade1f1b5f4437a1427601155649344?ds=inline OSPF: Remove two unnecessary dereferences Remove also two unnecessary ND_TCHECK_SIZE(). (cherry picked from commit aca18478998aef90a726935eb532283c959c5119) --- diff --git a/print-ospf.c b/print-ospf.c index d3f519c3..9fe9123c 100644 --- a/print-ospf.c +++ b/print-ospf.c @@ -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 */