X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/da20bc56d6100b5275d6f85c4a25bac1dab4e57e..d7b497cac78b6e22a66a6bae9bdec60a8044f67a:/print-geonet.c diff --git a/print-geonet.c b/print-geonet.c index 1e98fc5f..e40c6511 100644 --- a/print-geonet.c +++ b/print-geonet.c @@ -90,7 +90,7 @@ print_long_pos_vector(netdissect_options *ndo, return (-1); ND_PRINT((ndo, "GN_ADDR:%s ", linkaddr_string (ndo, bp, 0, GEONET_ADDR_LEN))); - if (!ND_TTEST2(*(bp+12), 8)) + if (!ND_TTEST_8(bp + 12)) return (-1); lat = EXTRACT_BE_U_4(bp + 12); ND_PRINT((ndo, "lat:%d ", lat)); @@ -127,7 +127,7 @@ geonet_print(netdissect_options *ndo, const u_char *bp, u_int length, if (length < 36) goto invalid; - ND_TCHECK2(*bp, 8); + ND_TCHECK_8(bp); version = bp[0] >> 4; next_hdr = bp[0] & 0x0f; hdr_type = bp[1] >> 4; @@ -242,7 +242,7 @@ geonet_print(netdissect_options *ndo, const u_char *bp, u_int length, case 2: /* BTP A/B */ if (length < 4) goto invalid; - ND_TCHECK2(*bp, 4); + ND_TCHECK_4(bp); print_btp(ndo, bp); length -= 4; bp += 4; @@ -254,7 +254,7 @@ geonet_print(netdissect_options *ndo, const u_char *bp, u_int length, * or was that just not * reporting genuine errors? */ - ND_TCHECK2(*bp, 2); + ND_TCHECK_2(bp); print_btp_body(ndo, bp); } break;