X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/6bc44295cfbe1f7b6633c755841518f4b159aa8a..1a04b92e365f5ed01ca38619b41bcc4fc9cbd63c:/print-calm-fast.c diff --git a/print-calm-fast.c b/print-calm-fast.c index c9be008c..6fa91a8f 100644 --- a/print-calm-fast.c +++ b/print-calm-fast.c @@ -24,6 +24,7 @@ #include #include "netdissect.h" +#include "extract.h" #include "addrtoname.h" /* @@ -42,11 +43,11 @@ calm_fast_print(netdissect_options *ndo, const u_char *bp, u_int length, const s int srcNwref; int dstNwref; - ND_TCHECK2(*bp, 2); + ND_TCHECK_2(bp); if (length < 2) goto trunc; - srcNwref = bp[0]; - dstNwref = bp[1]; + srcNwref = EXTRACT_U_1(bp); + dstNwref = EXTRACT_U_1(bp + 1); length -= 2; bp += 2;